[PHP] Array of Error Codes: Key/Values

2011-03-16 Thread Brendan_Crowley
Hi, I'm new to php and i'm looking to setup an array (or what work best) of codes and corresponding error strings, for example (pseudo code): ERROR_CODES = array('-1' => 'Error opening file', '-2' => 'General File IO Error', '-3' => 'Database connection error'); Access these string values using

RE: [PHP] PHP Fatal error: Cannot redeclare class

2011-03-14 Thread Brendan_Crowley
Thanks Louis, Worked a treat! -Original Message- From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com] Sent: 14 March 2011 15:10 To: Crowley, Brendan - Dell Team Subject: Re: [PHP] PHP Fatal error: Cannot redeclare class what about http://ch2.php.net/namespaces in php 5.3? 2011/

[PHP] PHP Fatal error: Cannot redeclare class

2011-03-14 Thread Brendan_Crowley
Hi, I get the following error in my apache error log: [14-Mar-2011 14:17:27] PHP Fatal error: Cannot redeclare class I created a simplified set of php files and classes to formulate this question. I have 5 php files; 2 of which declare a class that has the same name in both. I know it would be ve