What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP help

PHP help
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: PHP Variables
You have to define the variable in the global scope first, e.g:
code:
$test = 'foo';

function blah(){
  global $test;
  $test = 'bar';
}

echo $test; // outputs foo
blah();
echo $test; // outputs bar

12-25-2007 01:37 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP help - by lordy on 12-25-2007 at 01:15 PM
RE: PHP Variables - by Eljay on 12-25-2007 at 01:37 PM
RE: PHP help - by lordy on 12-25-2007 at 01:38 PM
RE: PHP help - by Eljay on 12-25-2007 at 01:42 PM
RE: PHP help - by lordy on 12-25-2007 at 01:44 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On