Longtext data to PHP Array

486 Views Asked by At

I inserted the array data in MySql table by encoding to JSON using json_encode($arrayData), but in longtext data type, not in JSON data type.

So I am not able to do json_decode($Db_Data_Stored_In_Longtext) for getting back the $arrayData while fetching the same from database. Any clue?

1

There are 1 best solutions below

0
anees ma kader On

Use json_decode($Db_Data_Stored_In_Longtext,TRUE,512,JSON_OBJECT_AS_ARRAY);

For more info visit json_decode() PHP