I need to create a big array in my code, I have the values in several tables (for easy management). I select it and now I have all the values in an array, in memory in the way I want. My problem, I need to write this array down, into the code. Is there a way to take an array which sits in the memory and translate it into a string “array(‘g’=>’h’,’b’=>’d’….)” which I can then echo and just copy-paste into my code?
Share
You want the
var_export()function. From the manual:The above example will output: