I googled around and found no valid solutions. Hope someone here will help. This is my code:
<?php
include "../includes/connection.php";
$sql_select="SELECT title FROM questions";
if (!$result=mysql_query($sql_select))
{
echo "Error<br>" . mysql_error($sql_select);
die();
}
if (mysql_num_rows($result)==0) {
echo "No questions!";
}
else {
$titles = mysql_fetch_array($result);
print_r($titles);
}
?>
For the purpose of my web application I need to put question titles into a new array. I thought mysql_fetch_array() function creates an array by itself, but I guess I was wrong. Any help? Thanks
$sql_selectstring to mysql_error. Check the docs.