There is a log log.txt form:
-------- текст array{....} текст текст -------- array{....} текст How to parse arrays from this log? That is, the output was:
array{....} array{....} I try this:
$s = file_get_contents('log.txt'); $arr = explode("----------",$s); foreach ($arr as $key => $val){ $array = split('array', $val); echo "<pre>"; echo $array; echo "</pre>"; } But it cuts only the word array, but I need the contents