Re: function return

From: Date: Fri, 06 Apr 2001 23:21:30 +0000
Subject: Re: function return
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47524@lists.php.net to get a copy of this message
I usually declare $db as global in the function, so I can just execute the function and continue with my querys. -- Plutarck Should be working on something... ...but forgot what it was. "Kurth Bemis" <kurth@usaexpress.net> wrote in message news:4.3.2.7.2.20010406110604.02b0a5a0@mail.usaexpress.net... > > i'm trying to make all my include files into functions for > manageability. I have one function that i'd like to get to work.....heres > teh code.. > > <?php > $db = mysql_pconnect("localhost", "user" ,"pass"); > mysql_select_db("database",$db); > ?> > > i had it in a function and had the function return $db.....but didn't > work.....any ideas? > > ~kurth > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47524) next »