Re: How deep can I go with embedded if s.
| From: | jimtronic | Date: | Mon, 17 Dec 2001 21:29:21 +0000 |
| Subject: | Re: How deep can I go with embedded if s. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77998@lists.php.net to get a copy of this message | ||
Well, I just made a test program that nested 1000 if() statements and it worked.
Just make sure you close all your curly brackets correctly.
IMHO, a large number of nested if else elseif statements indicate poor programming design. Sometimes they are necessary, but usually can be simplified by employing other methods.
Jim
Hello All, Is anybody aware of any limitations of php on embedded if ..else statements? For example: if ($a>$b) {-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim@nettmedia.comif ($c>$d) { this(); } else { if ($gg==$dd) { echo 'ladooo'; } else { echo 'baboooo'; } that(); } if ($e<$f) { tthis(); } else { tthat(); }else {echo "Oooops";}would this work, ===== Mehmet Erisen http://www.erisen.com __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net