format array for a string php code example Example: php array formatted output print("<pre>".print_r($array_data,true)."</pre>");