FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » pass variable in php construct
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: pass variable in php construct [message #172218 is a reply to message #172214] Fri, 04 February 2011 22:11 Go to previous messageGo to previous message
Curtis Dyer is currently offline  Curtis Dyer
Messages: 34
Registered: January 2011
Karma:
Member
Michael Fesser <netizen(at)gmx(dot)de> wrote:

> .oO(Curtis Dyer)
>
>> Joe <juliani(dot)moon(at)gmail(dot)com> wrote:

<snip>

>>> <?php
>>> if (!empty($_GET[req])) {
>>
>> You need quotes around ``req''.
>
> Yes.
>
>>> print "<h2>$_GET[req]</h2>";
>>
>> Here, too.
>
> No. Note the double quotes around the string. Quotes around the
> array key are not allowed here, unless you use curly syntax. So
> both of these ways are correct:

Thanks, good catch. Been away from PHP too long, I guess.

> Micha

--
Curtis Dyer
<?$x='<?$x=%c%s%c;printf($x,39,$x,39);?>';printf($x,39,$x,39);?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help with my website
Next Topic: validating / converting time for insertion into mysql DB??
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 13:44:07 GMT 2024

Total time taken to generate the page: 0.04448 seconds