PHP Tutorial

A web server programming language.

MySQL Select Data

MySQL Select Data With PHP

The SELECT statement is used to select data from one or more tables.

Selecting Data

We use the query() method to execute the SQL query, and fetch the results using a while loop with fetch_assoc().

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics