On Jun 28, 2005, at 9:40 AM, Kevin L'Huillier wrote:
In my opinion you should save exceptions for, well, EXCEPTIONal
problems. Either that or you use exceptions for a large system that
discriminates against specific types of errors and handles each error
type in a totally different way. Can w
> In my opinion you should save exceptions for, well, EXCEPTIONal
> problems. Either that or you use exceptions for a large system that
> discriminates against specific types of errors and handles each error
> type in a totally different way. Can we say bloat?
Depending on the system, malformatt
Kevin L'Huillier wrote:
...
Create the function split_location to return the associative array or,
if it is invalid, throws an exception. If PHP4, replace the exception
with similar error handling.
If efficiency is really the goal, then the OP probably shouldn't go the
route of Exceptions. J
I agree, your implementation is efficient. It does depend on the data
being entirely proper, however. If you can not be entirely sure (and
you should rarely be), i might add a suggestion that increases code
length, but decreases the chance of problems:
You might consider creating a function to v
Hi all,
Thanks for all the input. Really an eye opener on all the various ways
that could do the same thing! :) Really appreciate it.
Off to work with new ideas!
Tom Rogers wrote:
> function build($data){
> global $path;
> $i = count($path);
> $path[$i]['location'] = $data[1];
> $path[$i
Hi,
Tuesday, June 28, 2005, 10:26:12 AM, you wrote:
TR> This ay work:
TR> $str = 'Melbourne, AU, 21-07-2005 14:00:00|Perth, AU,
TR> 21-07-2005 18:00:00|Perth, AU, 25-07-2005 14:00:00|Melbourne, AU,
TR> 25-07-2005 18:00:00';
TR>
preg_match_all('/(\w+),\s*(\w+),\s*([0-9-]+)\s([0-9:]+)(?=\|)/s',$s
Hi,
Tuesday, June 28, 2005, 9:34:28 AM, you wrote:
WK> Hi All,
WK> I'm working on an aircraft booking system and it has multiple
WK> origin/destination data, concatenated into a single line:
WK> /* BEGIN DATA */
WK> Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Pert
On Tue, 28 Jun 2005, Wee Keat wrote:
Hi All,
I'm working on an aircraft booking system and it has multiple
origin/destination data, concatenated into a single line:
/* BEGIN DATA */
Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth,
AU, 25-07-2005 14:00:00|Melbo
Hi All,
I'm working on an aircraft booking system and it has multiple
origin/destination data, concatenated into a single line:
/* BEGIN DATA */
Melbourne, AU, 21-07-2005 14:00:00|Perth, AU, 21-07-2005 18:00:00|Perth,
AU, 25-07-2005 14:00:00|Melbourne, AU, 25-07-2005 18:00:00
/* EN
9 matches
Mail list logo