As a rule, I'm quite skillful at finding answers (that's why I didn't post before 😉) but recently I've puzzled myself with a question I was unable to find an answer for. So here it is: Is there any difference between the two code versions below (I mean the performance difference, of course) or are those two different coding standarts?
Version 1
while ($item= mysql_fetch_array($query)) {
$var1 = $item['var1'];
$var2 = $item['var2'];
$var3 = $item['var3'];
$foo = $var1 . $var2 . $var3;
}
Version 2
while ($item= mysql_fetch_array($query)) {
$foo =$item['var1'] . $item['var2'] . $item['var3'];
}
Would be appreciated for explanations and/or links. 🙂