php dump array code example
Example 1: print array php
<?php
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
echo "<pre>";
print_r ($a);
echo "</pre>";
?>
Output:
Array
(
[a] => apple
[b] => banana
[c] => Array
(
[0] => x
[1] => y
[2] => z
)
)
Example 2: php var dump die
$variable = "hello";
var_dump($variable);
die();
Example 3: php dump
$variable = "Hello";
var_dump($variable);
Example 4: php dump to page
$variable = "Hello";
var_dump($variable);