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

Home » Imported messages » comp.lang.php » scoping inside a block
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
scoping inside a block [message #176349] Tue, 27 December 2011 20:08 Go to previous message
oldyork90 is currently offline  oldyork90
Messages: 9
Registered: December 2011
Karma:
Junior Member
Is there a way to localize a var inside a block? Can I have this
behavior without calling a function?


$myA = 'A'

{
$myC = 'C';
$myA = 'B';
echo $myA . ' says B';
}

echo $myA . ' says A';
echo $myC .... does not exist


Thank you.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: transfering all MySQL rows to an array
Next Topic: Trouble with sending e-mail from simple php script
Goto Forum:
  

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

Current Time: Mon Nov 25 04:31:57 GMT 2024

Total time taken to generate the page: 0.04848 seconds