Code Examples and Industry News

Display Query Results Using PHP Function Var_Dump

PHP - Created by Casey Martin: 2014-05-10 20:13:00

To display MySQL query results in PHP, you can use var_dump(). Here's an example:

$sql = mysql_query("SELECT * FROM your_table WHERE key = 'value'");
$assoc = mysql_fetch_assoc($sql);

// Dump variable containing the result of the MySQL query