Array?

From: Date: Wed, 25 Aug 2004 18:17:06 +0000
Subject: Array?
Groups: php.general 
Request: Send a blank email to php-general+get-194706@lists.php.net to get a copy of this message
I cannot seem to access elements inside of the array $things in the code below. All of the errors say "Undefined offset: 7 in /Library/WebServer/Documents/lis/check.php on line 26" I don't see why... The code is: $q = "select * from users where email='".$email."' and password='".$pass."'"; $results = mysql_query($q); if ($results) { while ($list=mysql_fetch_assoc($results)) { $things[]=$list; } } //$things[7] is a MySQL timestamp column named "last_login" $date = strtotime($things[7]); Thanks in advance, Nathan -- Nathan Mealey Director of Operations Cycle-Smart, Inc. P.O. Box 1482 Northampton, MA 01061-1482 nathan@cycle-smart.com (413) 587-3133 (413) 210-7984 Mobile (512) 681-7043 Fax

« previous php.general (#194706) next »