“json_encode ()” Kode Jawaban

php json_encode

$person = array( 
    "name" => "Johny Carson", 
    "title" => "CTO"
); 
$personJSON=json_encode($person);//returns JSON string
Grepper

json_encode ()

json_encode(['name' => 'Jake', 'country' => 'Philippines'])
Shinta

JSON_ENCODE PHP

$person = array( 
    "name" => "Johny Carson", 
    "title" => "CTO"
); 
$personJSON=json_encode($person);//returns JSON string

=====================================================
  
$function = "#!!function(){}!!#"; 
$message = "Hello";

$json = array(   
  'message' => $message,
  'func' => $function
);
$string = json_encode($json);
$string = str_replace('"#!!','',$string);
$string = str_replace('!!#"','',$string);
echo $string;
Said HR

Php - json_encode ()

<?php
$age = array("Peter"=>35, "Ben"=>37, "Joe"=>43);

echo json_encode($age);
?>
naly moslih

Jawaban yang mirip dengan “json_encode ()”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya