I have a number of situations like the following:
foreach ($array as $value) {
$concat .= $value;
}
echo $concat;
Of course when error checking in E_ALL mode, I get a notice of an undefined variable ($concat), because I'm starting right off by appending to it.
So I can either declare:
$concat = null;
or
$concat = '';
at the beginning of my loop. Which is the better choice?
Also, how do either of these options interact with isset()? Am I right in guessing the former will return false, and the latter true, or will they both return true?
Thanks