Results 1 to 1 of 1

Thread: Create HTML Table from PHP and MySQL

  1. #1
    Moderator
    Join Date
    Oct 2005
    Answers
    305

    Create HTML Table from PHP and MySQL

    Here I will show you how you can create HTML Table from PHP and MySQL

    PHP Code:

    $query 
    "SELECT < column_names > from < table_name >";
    $result mysql_query($query);

    echo 
    "<table>";
    while (
    $row mysql_fetch_assoc($result)) {
       echo 
    "<tr><td>".implode("</td><td>",$row)."</td></tr>";
    }
    echo 
    "</table>"


    Last edited by Lokesh M; 09-14-2017 at 01:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact