0
我正在特林得到的查詢字符串ID幾乎工程JSON請求,但它是增加 somesort額外的數組對象PHP json_encode陣列接取
$id = $_GET['id'];
$result = mysqli_query($con,'SELECT * FROM ContactInfo WHERE id =' . $id);
$row = mysqli_fetch_array($result);
echo json_encode($row);
{"0":"terry","FirstName":"terry","1":"rihoff","LastName":"rieff","2":"alientory","website":"alieory","3":"`123","PhoneNumber":"`123","4":"123","Fax":"123","5":"2","id":"2"}
我只能得到一個接觸,但看起來像exrtra數組被添加到每個字段
這兩個選項的工作十分感謝我新它必須是簡單的東西 – Terry