Forum Moderators: coopster
$dog=''; $cat=''; $monkey=''; $i=''; $u=''; $weall='';
You could also make an array of strings, loop through and set the variable named that string to '', but that would be just a tiny bit less efficient php-wise, and 'adding' variables to the list not really any easier, since it's so easy to add variables to a line of variables like this.
I like the one-line approach since I really like as much code as I can have on my screen (providing it's legible), and it's just so obvious what this line is doing that putting it into multiple lines doesn't help legibility, but takes up screenspace. Yeah, code folding is supposed to help with this kind of thing, but I've never picked up that habit, it tends to confuse me more when I'm trying to work fast.