I have an array of the form $data[][] where the first index is row and the second is column. I would like to take a template (pull the contents into a variable) and then replace all instances of
r0c0, r0c1 ... r9c9 with the appropriate instance in the data array:
data[0][0], data[0][1], ..., data[9][9]
I tried this:
$template = ereg_replace("r([0-9])c([0-9])",$data["\1"]["\2"],$template);
it doesnt give any errors, but it also doesnt do what I wanted it to do. Instead of replacing rxcy with $data[x][y], it just replaces them with nothing.
Can anyone help?