I have an array:
$path_r = array("/oldsites/web-sites","/oldsites/web_elements","/oldsites/web_old_stuff");
I do a bunch of stuff to it and everything is fine until this line of code:
$path_r[$i][$j] = $name;
Just prior to that line, the array ($path_r) looks like this (same as above):
Array
(
[0] => /oldsites/web-sites
[1] => /oldsites/web_elements
[2] => /oldsites/web_old_stuff
)
But, just after, it looks like this:
Array
(
[0] => /olds0tes/web-sites
[1] => /oldsites/web_elements
[2] => /oldsites/web_old_stuff
)
That is to say, the letter "i" in the first value is replaced by the value (zero) of the variable $i. But only once. Can't figure out why. Am I doing something wrong or is it just run-of-the-mill demonic activity?