To change the memory limit for one specific script by including a line such as this at the top of the script:

ini_set("memory_limit","64M");

The 12M sets the limit to 64 megabytes. If this doesn’t work, keep increasing the memory limit until your script fits.

You can change permanently for all PHP scripts running on the server by adding a line to the server’s php.ini file:

memory_limit = 64M

Keep in mind that a huge memory limit is a poor substitute for good coding. Some applications like data scrappers are run infrequently and require lots of memory like importing and processing a big data file using RSS, XML, JSON API etc.

Make sure each time script required server memory resources; need to release them when script/process finish first iteration to save memory uses 😉

<?phpfunction json_add($old,$new){// function to add json strings $old, $new are arrays$old_arr= json_decode($old,true);if(is_array($old_arr)){$new_arr=array_merge($old_arr,$new);return json_encode($new_arr);}else{// it means first column updationreturn json_encode ($new);}}/*here $json_str is json formated string in which we have to add new $array*/json_add($json_str,$array);?>

A SET datatype can hold any number of strings from a predefined list of strings. The ENUM datatype restricts to a single member of the set of predefined strings, the SET datatype allows to store any of the values together, from none to all of them.