I am running a Mysql query in a php file and parsing it as json as follow:
$json_response = array();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$row_array['artist'] = $row['artist'];
$row_array['song'] = $row['song'];
//push the values in the array
array_push($json_response,$row_array);
}
echo json_encode($json_response);
There are thousands of entries; Is there any way I can filter the JSON results based on a value? something like: mylink.php/artist1 or mylink.php?artist=1
I would really appreciate any sort of ideas.
thanks