print_r(,true ) passes its output back as its return value, and not print anything out.
<?
$myarray = array("Apples", "Oranges", "Pears");
$size = count($myarray);
$output = print_r($myarray, true);
print $output;
?>
Related examples in the same category