Improve company productivity with a Business Account.Sign Up
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
$result = mysql_query("SQL QUERY HERE");
$rows = array(); // create empty array
while($row = mysql_fetch_assoc($result)) // fetch rows
$rows = $row; // append row to array
Open in new window
// some loop structure here to iterate through each index in your php array
// end the loop
var array = new Array();
array = json_encode($rows);
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.