I want to make the results of a foreach loop into a string variable I can use later all over (so I don't need to paste the foreach loop everywhere). I have this:
foreach($pairs as $d=>$m) {
$orderedpairs .= "[".$d."],[".$m."]"+"<br />";
}
echo $orderedpairs;
If I substitute the assignment operator with "echo", it works fine, so the loop is ok, I think it's just the variable assignment that's at issue. Thanks!