daily availability chart array

From: Date: Mon, 26 May 2003 20:39:31 +0000
Subject: daily availability chart array
Groups: php.general 
Request: Send a blank email to php-general+get-149011@lists.php.net to get a copy of this message
I need to create a daily availability chart and currently am using multidimensional arrays to assign which day/timeslot is chosen. My problem is that in doing so, I have to create 7 "foreach" statements to go through each of the days to pick out the timeslot values. ie. avail[mon][1] (morning) avail[tues][2] (afternoon) avail[wed][4] (evening) avail[thurs][8] (night) etc. (the above data is taken from a user input form, user can choose 1 or all timeslots) I need to loop through these values for bitwise calculation and comparison to a mysql db field. The user can have multiple choices in the same day so the obtained bit values would have to be added accordingly. Is there any way to get around using 7 loops to create the bit value? Any suggestions are greatly appreciated! Jason

« previous php.general (#149011) next »