Re: [PHP] PHP Brain Teasers [SPOILER]
- From: parasane@xxxxxxxxx ("Daniel Brown")
- Date: Fri, 29 Jun 2007 10:24:01 -0400
On 6/29/07, clive <clive@xxxxxxxxxx> wrote:
ok this one should be easy:
<?
$animal = array ("pig","cow","bat","chicken","dog");
for ($i = 0; $i < sizeof($animal); $i++) {
$sighted = ($animal[$i] != "bat" ? "see" : "blind");
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Blind as a bat.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
.
- Prev by Date: RE: Address book - LDAP or MySQL?
- Next by Date: Re: Is this a php bug?
- Previous by thread: Is this a php bug?
- Next by thread: Re: [PHP] shuffle or mt_rand
- Index(es):
Relevant Pages
|