我在PHP中循环来自 MYSQL 数据库的注册 ID 时遇到问题。这是我实现它的方式,但我确信它出了点问题。
$apiKey = array();
$i = 0;
if($_POST['course1'] == '1')
{
while($row = mysql_fetch_array(mysql_query("SELECT Registration_id FROM students WHERE course1 ='1' ")))
{
$apiKey[$i] = $row['Registration_id'];
$i++;
}
}
但是在这里它给了我一个像这样的Android LogCat错误:
11-27 16:56:25.336: E/JSON(972): Array<br />n<b>Fatal error</b>: Maximum execution
time of 30 seconds exceeded in
<b>/home/Php/send.php</b> on line
<b>34</b><br />n
11-27 16:56:25.346: E/JSON Parser(972): Error parsing data org.json.JSONException:
Value Array<br of type java.lang.String cannot be converted to JSONObject