Re: Change styling depending on var value

From: Date: Fri, 20 Nov 2009 20:54:16 +0000
Subject: Re: Change styling depending on var value
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-299986@lists.php.net to get a copy of this message
Dan McCullough wrote:
To add to what Ashley said about $row[3], remember that when you are returning from the db the counter for fields will start at 0 not 1, so if its the 3rd field that will be $row[2]. You might also want to do switch rather then elseif but thats always a good debate.
Thanks, Dan. I had checked that a while ago. I also tried the same script on a different row, changing the strings in the variables to match the data in the fields - same result, always defaults to the ELSE color. Cheers --- Phil

« previous php.general (#299986) next »