newbie array question

From: Date: Thu, 10 Jul 2003 14:29:39 +0000
Subject: newbie array question
Groups: php.general 
Request: Send a blank email to php-general+get-154736@lists.php.net to get a copy of this message
Hi All Im new to php and are getting a bit confused about the sybase_fetch_array function (i think that this is the same as mysql_fetch_array?). If i have a valid sql query that returns three the records 'john','jack' and 'mary' and i want to put that into an array where array[0]->john,array[1]->jack etc how do i do this? Im trying to use sybase_fetch_array as follows: $query = "select name from names (where age <'23'')"; $numero= sybase_connect("database" , "user" , "password" ) or die ("Unable to connect to database server"); $result=sybase_query($query,$numero ); $names=sybase_fetch_array($result); I then try and do something like print $names[0]; but it doesnt work. Sorry if this is really basic any help would be greatly appreciated! --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

« previous php.general (#154736) next »