www.webdeveloper.com
Results 1 to 3 of 3

Thread: Display Data without While Loop

  1. #1
    Join Date
    Nov 2007
    Posts
    362

    Display Data without While Loop

    Can data in the database be displayed without using a while loop. Obviously only one record will get displayed.

    Code:
    mysql_select_db("db", $con);
    
    $result = mysql_query("SELECT * FROM details");
    
    while($row = mysql_fetch_array($result))
    {
      echo $row['FirstName'] . " " . $row['LastName'];
      echo "<br />";
    }

  2. #2
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739

  3. #3
    Join Date
    Nov 2007
    Posts
    362
    How?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles