Is it possible to use extract() with an array key name 'some.key'?
Posted
by chadley
on Stack Overflow
See other posts from Stack Overflow
or by chadley
Published on 2010-06-16T22:01:29Z
Indexed on
2010/06/16
22:02 UTC
Read the original article
Hit count: 148
php
If I am going to use the code:
extract(
array(
'key.name' => 'value',
'somekey' => 'somevalue'
)
)
Is there some way for me to retrieve the first value? E.g. ${'key.name'}
or similar.
I know I can retrieve the second value with $somekey
but I am curious if its possible with .
in the name.
© Stack Overflow or respective owner