$your_variable='$return_from_db_query'; if ($your_variable='no'){ ?> } else { ?> } // -- Better to sub red and green for hex color codes though.