Here is what I’ve learned so far being a new daddy.
function pacifier_status ($status) {
if ($status == "active") {
echo "I'm happy and I might even fall asleep";
sleep("still contemplating");
} else if ($status == "inactive") {
echo "Too lazy to work on it, maybe I should cry?";
sleep("no way");
} else if ($status == "dropped" {
echo "zzz... zzz...";
sleep(1000);
}
}
Sep 16th, 2008
23:55
apostolos said:
I found the bug! Your 2nd “else if …”, you are missing a closing parenthesis… ;-)As your baby project grows up you will also learn new functions like:function small_kid_wants (item){ if (getItem(item)==true) { return “Happy laughter”; parent.status = “cool”; } else { return “I want my grannie!” parent.status = “killing ancestors mood”; }};-)