![]() |
get variable value out of a string
Hello dear colleagues from the talkphp forum,
I would very much appreciate some help regarding the following subject: PHP Code:
$variable1 I would like to get the value "Hello" instead. Can someone explain to me which php function can I use to retrieve the result that I am looking for ? Thanks in advance, pipesportugal |
No such function needed. The single quotes are printed literally, without printing the contents of a variable, they simply print what you've put. You can either put them all in double quotes, or in no quotes at all:
php Code:
|
There are numerous ways of doing this, here are three:
PHP Code:
|
Hello Dear friends Wildhoney and Salathe,
Wildhoney, I think that You did not really understand what I meant, most probably by my faulty description of my needs. Salathe, the $$ thing has solved it and was what I was looking for. I also understood the GLOBALS solution. That would also do the trick. Thank You to both of You for disposing of Your time. Regards, pipesportugal |
| All times are GMT. The time now is 12:19 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0