| | |
Case Help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Case by itself serves little or no purpose. I think you're looking for the switch function, instead.
Geek and a Half Blog
PHP's switch/case statement is like a big if/elseif/else statement. I use it all the time. I think the PHP documentation explains it well--not sure I can make it more clear.
http://www.php.net/manual/en/control...res.switch.php
You don't have to use switch/case--you can use if/elseif/else instead, but switch/case is cleaner. Also, switch/case allows you to setup conditions where more than one test is true so multiple case sections fire--although I've never done this in my thousands of lines of PHP code.
http://www.php.net/manual/en/control...res.switch.php
You don't have to use switch/case--you can use if/elseif/else instead, but switch/case is cleaner. Also, switch/case allows you to setup conditions where more than one test is true so multiple case sections fire--although I've never done this in my thousands of lines of PHP code.
![]() |
Similar Threads
- New Case Question (Cases, Fans and Power Supplies)
- Moving to a larger case (Troubleshooting Dead Machines)
- case fan installation (Motherboards, CPUs and RAM)
- microsoft's antitrust case (IT Professionals' Lounge)
Other Threads in the PHP Forum
- Previous Thread: Securely Allow users to add to Database
- Next Thread: help with creating form counter
Views: 1611 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail mediawiki menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube





