function LogIt($arr, $text) { $html=$text."\n"; foreach($arr as $k=>$v) { if(is_array($v)){ LogIt($v,'Sub array'); }else{ $html.=$k."=>".$v."\n"; } } $html.=date("d.m.Y H:i:s")."\n##########################################\n\n\n"; $file=$_SERVER["DOCUMENT_ROOT"]."/custom_logs.txt"; file_put_contents($file, $html, FILE_APPEND | LOCK_EX); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter