Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread dholmes1031
Something simple like this would work $date=date('Y'); $startdate='2011'; if($date == $startdate) { echo $startdate } else { Echo $startdate; Echo '-'; echo $date; } Sent via BlackBerry from T-Mobile -Original Message- From: David Mehler dave.meh...@gmail.com Date: Sat, 30 Apr 2011

[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 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