2

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.

2 Answers 2

2

http://nl.php.net/manual/en/function.extract.php

Checks each key to see whether it has a valid variable name.

Nope, it won't extract 'key.name'. You can inspect the $GLOBALS array to see it isn't there.

Sign up to request clarification or add additional context in comments.

Comments

0

The answer is no. Give this post a read.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.