Hello,
I have come across these echo types before:
echo
print_r
printf
var_dump
But now come across:
var_export.
https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_var_var_export
$a = 32;
echo var_export($a) . "<br>";
$b = "Hello world!";
echo var_export($b) . "<br>";
$c = 32.5;
echo var_export($c) . "<br>";
$d = array("red", "green", "blue");
echo var_export($d) . "<br>";
$e = array(32, "Hello world!", 32.5, array("red", "green", "blue"));
echo var_export($e) . "<br>";
When would you use any of these over the others and why ?
How does var_export become handy ?
Do show me some examples to understand.
Thanks