Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Variable Blankness

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Variable Blankness

Postby bonkers » Thu Jun 05, 2003 9:24 pm

Ok, I've got fileone.php and it includes variables.php. When trying to access variables from variables.php, when I'm in a self created function (like function foo()), it doesn't print them, but if it's just like, right under the "include 'variables.php';" then it doesn't have a problem, it's not until I start defining functions where it becomes a problemo.
bonkers
New php-forum User
New php-forum User
 
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Re: Variable Blankness

Postby WiZARD » Fri Jun 06, 2003 1:21 am

bonkers wrote:Ok, I've got fileone.php and it includes variables.php. When trying to access variables from variables.php, when I'm in a self created function (like function foo()), it doesn't print them, but if it's just like, right under the "include 'variables.php';" then it doesn't have a problem, it's not until I start defining functions where it becomes a problemo.

check safe mode
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby bonkers » Fri Jun 06, 2003 5:12 am

no I figured it out, I'm stupid. Never try to program when you're half awake. I read this page but I didn't catch it. Check it out: http://us3.php.net/variable.scope I think I missed it the first time around.
bonkers
New php-forum User
New php-forum User
 
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Postby WiZARD » Fri Jun 06, 2003 6:49 am

bonkers wrote:no I figured it out, I'm stupid. Never try to program when you're half awake. I read this page but I didn't catch it. Check it out: http://us3.php.net/variable.scope I think I missed it the first time around.

he-he-he
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron