Re: [PHP] What's faster using if else or arrays?

2011-04-30 Thread Stuart Dallas
and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM

Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Steve Staples
@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM Hello Dholmes1031, I would write it like this: switch($foo) { case 5: $dothis; break; case 3: $dothat; break; default: $donothing; break; } This sounds like a job for *dun

Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Robert Cummings
...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM Hello Dholmes1031, I would write it like this: switch($foo) { case 5: $dothis; break; case 3: $dothat; break; default: $donothing; break; } This sounds

Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread tedd
At 7:19 PM -0400 4/28/11, Robert Cummings wrote: On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: Thanks switch and case seems to be more faster for the job and a lot cleaner Hello Dholmes1031, I would write it like this: switch($foo) { case 5: $dothis; break; case 3: $dothat;

Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Tamara Temple
--Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM Hello Dholmes1031, I would write it like this: switch($foo) { case 5: $dothis; break; case 3: $dothat

[PHP] What's faster using if else or arrays?

2011-04-28 Thread dholmes1031
I'm working on a project and I was wondering if I should use if else's or arrays ?? Example If($foo= 5) { $dothis } ElseIf($foo= 3) { $dothis } Else{ $donothing } Or put it in some short of arrays and pregmatch what would be the best to use and easiest to read Sent via BlackBerry from

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Andre Polykanine
/m_elensule Facebook: http://facebook.com/menelion Original message From: dholmes1...@gmail.com dholmes1...@gmail.com To: php-general@lists.php.net Date created: , 12:30:31 AM Subject: [PHP] What's faster using if else or arrays? I'm working on a project and I

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread dholmes1031
Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM Hello Dholmes1031, I

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Robert Cummings
On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays