programming-examples/php/Basics/Print an array in PHP.php

16 lines
222 B
PHP
Raw Permalink Normal View History

2019-11-18 14:44:36 +01:00
<?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;
}
?>