Re: PHP logic - Whats going on here?

From: Date: Wed, 11 Aug 2004 14:28:41 +0000
Subject: Re: PHP logic - Whats going on here?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193448@lists.php.net to get a copy of this message
Thanks for your reply, it all seems logical when you think of it, still I also think it sounds logical without the extra ELSE statement since the function has to executed for the first IF to do the comparison, meaning that the email should be sendt in the first place. (If it didnt how could it state FALSE or TRUE, unless PHP only simulates the function if it falls outside the initial IF statement) However, no reason to argue the obvious, :D On the other hand, this would also mean that the exmaples from phpmailers homepage are wrong : [ SNIP FROM http://phpmailer.sourceforge.net/extending.html ] $mail->Body = $body; $mail->AltBody = $text_body; $mail->AddAddress($row["email"], $row["full_name"]); $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg"); if(!$mail->Send()) echo "There has been a mail error sending to " . $row["email"] . "<br>"; [ /SNIP] This is probably why I in the first place removed the extra ELSE statement, since I didnt see any reason for it. But in future Ill always include it it seems, :D -- Kim Steinhaug ------------------------------------------------------------------------- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. ------------------------------------------------------------------------- www.steinhaug.com - www.easywebshop.no - www.easycms.no www.webkitpro.com -------------------------------------------------------------------------

« previous php.general (#193448) next »