php put print_r em variável
// When the second parameter is set to TRUE
// print_r() will return the information rather than print it
$var_info = print_r($var,true);
Frantic Ferret