Thread
:
Using Variables outside a function
View Single Post
#
2
(
permalink
)
10-30-2007, 09:22 AM
DaveSawers
WebProWorld Veteran
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 492
Re: Using Variables outside a function
Put the new_var into the argument list and pass it by reference, e.g.
function example ($input_var, &$new_var) {
...
}
$input_var = some_var;
$new_var = "";
example($input_var, $new_var);
echo $new_var;
__________________
Dynamic Software Development
www.activeminds.ca
DaveSawers
View Public Profile
Send a private message to DaveSawers
Visit DaveSawers's homepage!
Find all posts by DaveSawers