http://php.flashwebhost.com/melbin/subjects.php
PHP Code:
<?php
$subjects = array('English', 'Malayalam', 'Physics', 'Chemistry', 'Biology', 'Mathematics');
echo '// Print Array using print_r';
echo '<pre>';
print_r ($subjects);
echo '</pre>';
echo '<br>';
echo '// Print Array using foreach <br><br>';
foreach ($subjects as $subject) {
echo $subject . '<br>';
}
http://php.flashwebhost.com/melbin/mixedArray.php
PHP Code:
<?php
// Mixed Array
$mixedArray = array(0, 1, 2, 3, array('Lion', 'Tiger', 'Zebra'));
echo '<pre>';
print_r ($mixedArray);
echo '</pre>';
Bookmarks