Using a string to reffer to an array or its member
Posted: Wed Apr 13, 2005 2:53 am
Can this be done - and how ?
I have this string:
Now, I want to use it to reffer - call the value of that array-member.
Tried the eval(), but returned nothing.
Is there a way to do this ?
I need this string to generate endless ( how many levels are needed at that situation ) depth ( number of sub-levels ) od an array, by editing that string.
Hope I was clear enough.
Thanks Ahead !
I have this string:
Code: Select all
$new_value = '$old_array[1][0]';Tried the eval(), but returned nothing.
Is there a way to do this ?
I need this string to generate endless ( how many levels are needed at that situation ) depth ( number of sub-levels ) od an array, by editing that string.
Hope I was clear enough.
Thanks Ahead !