print values of array php code example
Example 1: php echo array
<?php
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print_r ($a);
?>
Example 2: php echo array
foreach($results as $result) {
echo $result . '<br>';
}
Example 3: print array on php
foreach($results['data'] as $result) {
echo $result['type'], '<br>';
}