<?php
$mongodb = array ('operations' => array('create','delete','drop') );
foreach($mongodb as $element => $inner_array )
{
echo '<br>'.$element.'<br>';
foreach($inner_array as $item)
{
echo '<br>'.$item.'<br>';
}
}
/** documentation commentS
array declaration in PHP is very simple
first, define a string after that declare an array and keeps elements in that
now add inner array by using => sign
similarly, declare an inner array
for displaying them use for each function with two parameters
1st parameter string name
and 2nd as array name and then echo elements
inside array .
*/
?>
$mongodb = array ('operations' => array('create','delete','drop') );
foreach($mongodb as $element => $inner_array )
{
echo '<br>'.$element.'<br>';
foreach($inner_array as $item)
{
echo '<br>'.$item.'<br>';
}
}
/** documentation commentS
array declaration in PHP is very simple
first, define a string after that declare an array and keeps elements in that
now add inner array by using => sign
similarly, declare an inner array
for displaying them use for each function with two parameters
1st parameter string name
and 2nd as array name and then echo elements
inside array .
*/
?>
No comments:
Post a Comment