Re: Making varibles (more than one) with a function.

From: Date: Thu, 23 May 2002 21:22:29 +0000
Subject: Re: Making varibles (more than one) with a function.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98995@lists.php.net to get a copy of this message
Ok, I see. You have to declare global first and then assign value. "David Duong" <davidduong1@hotmail.com> wrote in message news:20020522232734.5100.qmail@pb1.pair.com... > How could I have a function create variables that can be used in other > functions? > > _Example_: > makevars() { > list($md5,$pusername,$pproject,$pfile) = explode(":",$authok); > $user = $pusername; > $project = $pproject; > $file = $pfile; > } > > function display () { > makevars(); > echo "$user,$project,$file"; > } > > I am aware that return can return strings but is their a set global or a > function similar to return? > >

« previous php.general (#98995) next »