I'm trying to create a multi-dimensional array but it is throwing an error that just doesn't make sense. Does anyone see anything that could be causing this?
This code:
echo "<br />cnt: " . $cnt . "; k: " . $k . "; v: " . $v . "\n<br />";
echo "Type (cnt): " . gettype($cnt) . "<br />";
echo "Type (k): " . gettype($k) . "<br />";
echo "Type (v): " . gettype($v) . "<br />";
$values[$cnt][$k]= $v;
Produces this:
cnt: 1; k: date; v: 2015-12-10
Type (cnt): integer
Type (k): string
Type (v): string
Fatal error: Cannot use string offset as an array in /home/........../putRecords.inc.php on line 47