programming-examples/php/Basics/Print an array in PHP.php
2019-11-18 14:44:36 +01:00

16 lines
222 B
PHP

<?php
$arr = array(10,20,30);
// to display array using print_r()
print_r($arr);
// to display array using foreach()
foreach($arr as $v)
{
echo "<br>".$v;
}
?>