47 users online (1 members and 46 guests)  


  Results 1 to 2 of 2

Related

  1. dropdown display    Forum: HTML Forum
    Replies: 0
  2. Display the log file    Forum: CGI Perl Forum
    Replies: 0
  3. PHP Time Display    Forum: PHP Forum
    Replies: 2
  4. Display problem    Forum: CSS Forum
    Replies: 0
  5. CSS Rollover display    Forum: CSS Forum
    Replies: 4
  1. #1
    rdub's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2006
    Posts
    15

    Don't display empties

    How do I not display empty lines from my search?

    Here is my code where I display the search results:
    <strong><? echo $row['Customer']; ?></strong><br>
    <? echo $row['Description']; ?><br>
    <? echo $row['Phone']; ?><br>
    <? echo $row['Fax']; ?><br>
    <? echo $row['Email']; ?><br><br>

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: Don't display empties

    www.php.net

    Assuming you've got these search results from a mysql_query(), look up:
    While ( ... ) { ... } loops
    if ( ... ) { ... } statements
    mysql_fetch_array()
    and read the examples on how to combine them



Tags for this Thread