“JSON_ENCODE ()” Código de respuesta

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

Respuestas similares a “JSON_ENCODE ()”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código