If you use str_replace is there a way to count each time it replaces something? while ($new = str_replace($rep,$wit,$var)) would be infinite. Is str_replace usable in a foreach?
I wanna make a loop with an incrementing variable so a line like this:
|||1||2|3|||4||5|6|||7||8|9
Becomes
$1 = "1||2|3";
$2 = "4||5|6";
$3 = "7||8|9";
and so on. With actual values so that echo "$1" would give the value. I don't want it to just echo the previous. Any help? Delimiting sucks!