Sunday, December 18, 2011

[PHP] how to give the name of a Variable Input

Give the name of a variable the value of another is not so difficult if you know how.

[PHP] how to give the name of a Variable Input

Question :

It is possible, given a string of text 'hello' , create a variable that has that name, or a variable $ hello ?

What I get is something like (in the wrong code):

Should be equivalent to:

Matthias = $ 7;

Thank you for any suggestions!

Answer :

I think reading this article taken from PHP documentation can help you.

Basically you should do something like this:

See Pictures and Read more : [PHP] how to give the name of a Variable Input

No comments: