Array of Freebase MIDs and sending multiple queries to freebase
问题 I want to loop through the MySQL results which is an array of Freebase MIDs and I want the output to be the names of the Freebase article! Here's my code: $query = "SELECT `mid` FROM `items`"; $result = mysql_query($query); $count = 1; while ($row = mysql_fetch_array($result)) { $mid = $row['mid']; $simple_query = array('name'=> null, 'mid'=>$mid); $q_array = array('q'.$count=>array('query'=>$simple_query)); array_push ($query_array, $q_array ); $count++; } $jsonquerystr = json_encode($query