Re: function

From: Date: Sat, 01 Jul 2000 19:21:54 +0000
Subject: Re: function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4286@lists.php.net to get a copy of this message
Umm.. a lot of those varables are from outside of the function, and thus can not be used inside of the fuction... ----- Original Message ----- From: "Bartosz Aninowski" <bart@sonik.pl> To: <php-general@lists.php.net> Sent: Saturday, July 01, 2000 1:57 PM Subject: [PHP] function > when I call this function browser shows > Warning: 0 is not a MySQL result index in /home/public_html/test.htmls on > line 17 > > > 14 function checklink($name) > 15 { > 16 $result=mysql_db_query($SQLDB,"SELECT listname,tablename FROM info WHERE > user='bart'"); > 17 $rows = mysql_fetch_array($result); > 18 rows[$name]; > 19 > 20 } > 21 > 22 $var = checklink(listname); > 23 print ("$var"); > > when I am not using function everything is ok > > Bart > > > > -- > 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 (#4286) next »