“PHP JSON DATA A LA ARRAY” Código de respuesta

PHP Convertir la matriz a objeto JSON

$myArr = array("apple", "banana", "mango", "jackfruit");

$toJSON = json_encode($myArr);

echo $toJSON;
Lazy Loris

PHP JSON DATA A LA ARRAY

json_decode('{foo:"bar"}');         // this fails
json_decode('{"foo":"bar"}', true); // returns array("foo" => "bar")
json_decode('{"foo":"bar"}');       // returns an object, not an array.
Borma

Respuestas similares a “PHP JSON DATA A LA ARRAY”

Preguntas similares a “PHP JSON DATA A LA ARRAY”

Más respuestas relacionadas con “PHP JSON DATA A LA ARRAY” en PHP

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código