09-08-2007, 12:33 AM
|
#4 (permalink)
|
|
Super Moderator
Join Date: Sep 2007
Posts: 165
Thanks: 0
|
bleh, way to be picky.
Anyway, will update the main post....
And the reason for $szOutput being assigned? simply for readability, this is for beginners remember.
PHP Code:
$iVariable = ($aVariable[1] > $aVariable[2]) ? ($iVar == 1) ? 1 : 0) : 0;
Where as the above may be more efficient, its hardly the easiest code to read, especially for new PHP users. This is why im taking readability as a HUGE factor when writing these snippets, and things like not adding things assigning a variable before using it, is simply for ease of reading.
|
|
|
|