Forum Moderators: coopster

Message Too Old, No Replies

functions and variables

         

quozt

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

10+ Year Member



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

dcrombie

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



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

See PHP; Variable Scope [php.net]

;)