i have some php to show result as JSON like this
$dp = $_GET['dp'];
$query = mysql_query("select trip_id, trip_desc from current_data where dispatcher='".$dp."'");
$json = array();
while($row = mysql_fetch_assoc($query)){
$tripdata["code"]=$row["trip_id"]." - ".$row["trip_code"];
$json[] = $tripdata;
}
echo json_encode($json);
and result like this
[{"code":"S1.001 - UK"},{"code":"S1.002 - US"},{"code":"S1.003 - CA"}]
How to add value in First Result of my JSON, i want to result like this?
[**{"code":"Select Country"}**,{"code":"S1.001 - UK"},{"code":"S1.002 - US"},{"code":"S1.003 - CA"}]
Thanks