PHP ile JSON Oluşturma |
5 Mesajlar | 5.062 Okunma |
$json = array();
$json['contacts'][] = array(
'id'=> "c200",
'name'=> "Ahmet Talut",
'email'=> "wpeklentim@gmail.com",
'address'=>"Adres",
'gender'=> "Erkek",
'phone' => array(
'mobile'=> "23424324",
'home'=> "43242342",
'office'=> "",
));
echo json_encode($json);
?>
header('Content-type: application/json');
$json = array();
$json['contacts'][] = array(
'id'=> "c200",
'name'=> "Ahmet Talut",
'email'=> "wpeklentim@gmail.com",
'address'=>"Adres",
'gender'=> "Erkek",
'phone' => array(
'mobile'=> "23424324",
'home'=> "43242342",
'office'=> "",
));
echo json_encode($json);
header('Content-type: application/json');
$json = array();
$json['contacts'][] = array(
'id'=> "c200",
'name'=> "Ahmet Talut",
'email'=> "wpeklentim@gmail.com",
'address'=>"Adres",
'gender'=> "Erkek",
'phone' => array(
'mobile'=> "23424324",
'home'=> "43242342",
'office'=> "",
));
echo json_encode($json);