Is is possible I can assign output of var_dump($var)
to a variable? As a default behavior, var_dump() just prints output on screen. I want to append or assign its output to other variable and then output that later on. Like:
$a = true;
$b = var_dump($a);
echo $b;
Or you could just use
$content=var_export($variable,true)
echo $content;
Reference: http://www.php.net/var_export
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With