I\'ve got a problem with the mysqli result set. I have a table that contains a bunch of messages. Every table row represents one message. I have a few columns like ID, title
How your final array must look like?
Try this:
$result = $link->query("SELECT title, body FROM messages WHERE public = '1'"); $array = array(); while ($array[] = mysql_fetch_assoc($result)) {}