Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

json to array php

//2 ways
  //this is for string from $_REQUEST,$_POST to array
$jsonText = $_REQUEST['myJSON'];
$decodedText = html_entity_decode($jsonText);
$myArray = json_decode($decodedText, true);

//this is for json to array
$assosiative_array = json_decode(json_encode($jsonText),true);
 
PREVIOUS NEXT
Tagged: #json #array #php
ADD COMMENT
Topic
Name
3+1 =