> I'm using a while loop to display a list of people contained 
> in my database.
> I'd like to assign different font colors to each depending on 
> which city
> they're from, but I can't seem to get an if/elseif/else 
> statement to work
> inside the while loop.  Is there another way to do this?

Something like this maybe?:

<pseoudcode>
while($row=mysql_fetch_array($result){
  switch($row['city']){
    case 'bejing':
      $bgcolor='#FF0000';
      break;
    case 'tokyo':
       $bgcolor='#00FF00';
       break;
{...}
  }//switch
}//while
</pseoudcode>

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to