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
pass variable in php construct [message #172174] Thu, 03 February 2011 04:27 Go to previous message
juliani(dot)moon(at)gmail(dot)co is currently offline  juliani(dot)moon(at)gmail(dot)co
Messages: 6
Registered: January 2011
Karma:
Junior Member
I have these simple lines in my php script:

<?php
if (!empty($_GET[req])) {
print "<h2>$_GET[req]</h2>";
?>
<h3>"$_GET[req]"</h3>
<?php
} else {
...
}
?>

I wonder why the $_GET[req] value shows up within the php code block
(print to <h2> tags), but not showing up in the html block (between
<h3> tags)? Is it suppose so or I missed something? (I tried to pass
it to a local defined variable but still cannot be used in 'html'
block).

Thanks in advance,
joe
[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: Sat Nov 23 00:46:37 GMT 2024

Total time taken to generate the page: 0.04090 seconds