need help with foreach()

From: Date: Sun, 09 Mar 2003 22:06:55 +0000
Subject: need help with foreach()
Groups: php.db 
Request: Send a blank email to php-db+get-26209@lists.php.net to get a copy of this message
Okay, i have two arrays, $tips and $staff $tips has a key "date" (which is the date of the first day of the week, the second result in the array has the key of the second day of the week etc... ) and the value is a floating point decimal. $staff also has a key "date" and the value is an integer, the number of staff working in one day. To find out the ammount of tips every staff member is to get we have to divide the value of $tips by the value of $staff (when the dates are the same) what i was trying to get this to work is below, any help would be great, cheers dave ===================== foreach($tips as $key => $value){ $pointvalue[$key] = $value / current($staff) ; next($staff); } _________________________________________________________________ Express yourself with cool emoticons http://messenger.msn.co.uk

« previous php.db (#26209) next »