Code: Select all
GLOBALS['error'][] = array($line, $file, $code, $info);Any ideas or am I going to have to hand code something quick and dirty?
Moderator: General Moderators
Code: Select all
GLOBALS['error'][] = array($line, $file, $code, $info);Code: Select all
$dump = print_r($array, true);Code: Select all
$GLOBALS['errors'] = array(
array(1, 2, 43434, "An error occured"),
array(1, 2, 43434, "An error occured"),
array(1, 2, 43434, "An error occured"),
array(1, 2, 43434, "An error occured"),
);Code: Select all
1, 2, 43434, An error occured
1, 2, 43434, An error occured
1, 2, 43434, An error occured
1, 2, 43434, An error occuredCode: Select all
file_put_contents('data.php', '<?php return ' . var_export($GLOBALS['errors'], true) . ';');
...
$errors = require 'data.php';Code: Select all
$result = array_map('implode',
array_fill(0, count($ary), ','),
$ary);