Hi there, I am learning PHP recent days and there is still a lot of things that I don't know about yet and trying to figure out how to do thing within php. Anyway, I just came across extract () function which can extract variables from an array and set every elements in an array as a variable (as I'm sure you know that ). and I think that is just cool. My question is: Does the function work with multidimensional array as well? another question: Is there any built-in function or any other way to extract variables from multidimensional arrays? Thanks guys.
Do you mean recursive? If so, I don't think so. $a['one']['two'] = 12; extract($a); Will just give $one = array('two' => 12); extract() is not really useful, it just adds more useless memory in the script.
yes I know and that what I got when tried this function with multidimensional arrays. so I thought maybe there must be a similar function which works with multidimensional just like exTRact () works and variables from a normal array. I'm just trying to discover and understand things in PHP as I'm still a newbie. thanks Kaizoku if anyone has any other idea please let me know.