Re: PHP Interview questions

From: Date: Tue, 26 Aug 2003 23:28:13 +0000
Subject: Re: PHP Interview questions
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-160857@lists.php.net to get a copy of this message
* Thus wrote Gabriel Guzman (gabe@careercast.com): > On Tue, 2003-08-26 at 11:35, Curt Zirzow wrote: > > * Thus wrote Richard Baskett (php@baskettcase.com): > > > on 8/26/03 9:57 AM, Robert Cummings at robert@wocmud.org wrote: > > unfortunately, this won't work... you need to loop through the > lightbulbs... > > try something like: > > foreach ($lightbulbs as $bulb){ Only one light bulb from how I originally read it. Multiple light bulbs will be supported in the next version. > > > http://us4.php.net/manual/en/i-have-too-much-time-on-my-hands.php According to this manual I have to supply this patch to make the program work properly: *** lightbulb.php Tue Aug 26 23:21:10 2003 --- lightbulb.fix.php Tue Aug 26 23:21:51 2003 *************** *** 7,12 **** ! if ($lightbulb['temp'] > $room['temp']) { ! echo "switch #1"; ! } elseif ($lightbulb['ison']) { echo "switch #2"; } else { --- 7,12 ---- ! if ($lightbulb['ison']) { echo "switch #2"; + } elseif ($lightbulb['temp'] > $room['temp']) { + echo "switch #1"; } else { > > </joking> Cheers! Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#160857) next »