Steps to convert result of your PHP function var_dump() to string.

kumkumsharma

Administrator
Staff member
If you want to store PHP var_dump() function’s value to any other place like in log file, external file or any other place then you can do this with PHP output buffering.

If you want to save the structured variable info of $variable1 into the string $string:

Code:
ob_start();
var_dump($variable1);
$string = ob_get_clean();
print_r($string);
 
Top