just trying to add some setting for the admin in a database entry.
i’ve saved;
array('aviva'=>'aviva','teacher'=>'teacher');
into the field ‘fullPara’ but can’t seem to get it back into an array? Just spits it out as a string and i’ve tried eval but not sure where to go from here?
echo $userTypes['fullPara']; // spits out array('aviva'=>'aviva','teacher'=>'teacher');
any pointers welcome!
best, Dan
You want to look into the serialize() and unserialize() functions PHP offers.
Here is an example:
EDIT
I do NOT recommend this but here is how you would convert it to an array using eval:
Should get you what you were after.