Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

functions and variables

9:27 am on Jun 30, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
votes: 0

in my code i have
show_aa($count, $query);

this function connects the the database and displays the contents based on the query and the $count number...

everytime something is displayed inside the function it gets $count++ which works but when i try and use the results of $count after the function has ended... its the origninal $count before the function... (if this makes sence) any help of how to do this would help a lot


10:12 am on June 30, 2004 (gmt 0)

Inactive Member
Account Expired


All variables used inside a function have only local scope [b]unless[b] you use 'global' (or $_GLOBALS?).

See PHP; Variable Scope [php.net]