Codeman0013 Posted July 5, 2006 Share Posted July 5, 2006 hey i have a line of code that pulls the fax number from a database but if there is no fax number there i dont want it to show the fax line how would i alter my code to say this here is the code...<?php if($row_rs_schoolbus['fax'] != "") { ?><li>Fax: <?php echo $row_rs_schoolbus['fax'];?> </li><?php } ?> Link to comment Share on other sites More sharing options...
aspnetguy Posted July 5, 2006 Share Posted July 5, 2006 try this <?php if(strlen($row_rs_schoolbus['fax']) > 0) { ?><li>Fax: <?php echo $row_rs_schoolbus['fax'];?> </li><?php } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now