SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: echo tables

  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile echo tables

    whats the best way to display all rows in a table and the columns titles from mySQL, and print them to a page.

  2. #2
    SitePoint Enthusiast Goldfinger's Avatar
    Join Date
    Dec 2001
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do a while loop..

    while ( mysql_fetch_array(yourmysqlcall)) {

    echo("your tables");

    }


    the best way to print stuff in php is using this function

    $blah = <<<MyHTML
    <font face="verdana">adf</font>
    MyHTML;

    that way you dont have to place the \ in front of every " .

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    arr k thanks, just wondering if there was any functions, that just print the whole table nm. I will just do it like this thanks again

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use SELECT * FROM table and then loop through the results as Goldfinger posted

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


Bookmarks

Posting Permissions

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