Echo items with value of three

Posted by user342391 on Stack Overflow See other posts from Stack Overflow or by user342391
Published on 2010-05-24T14:40:13Z Indexed on 2010/05/24 14:41 UTC
Read the original article Hit count: 274

Filed under:
|

I need to echo all items in my row that have the value of three. If a field has the value of three I then need to echo the 'name' and 'description' on that row.

This is what I have so far

$result = mysql_query($query1) or die(mysql_error());    
while ($row = mysql_fetch_array($result))    
{  
  echo $row['status'];
}

I need to write 'if $row[`status´ == 3 echo 'description' 'name' else echo 'no current staus'

I hope I made some sense because I am seriously confused

© Stack Overflow or respective owner

Related posts about php

Related posts about echo