[PHP] function returning true or errors

2002-04-18 Thread Erik Price
I am writing a function that performs some actions. I would like to return true if the actions succeed, or return an error message if the actions fail. How should I go about it? The following code doesn't do it, because the returned error message is interpreted as a boolean true (I think

Re: [PHP] function returning true or errors

2002-04-18 Thread Jason Wong
On Thursday 18 April 2002 23:25, Erik Price wrote: I am writing a function that performs some actions. I would like to return true if the actions succeed, or return an error message if the actions fail. How should I go about it? The following code doesn't do it, because the returned error

RE: [PHP] function returning true or errors

2002-04-18 Thread SHEETS,JASON (Non-HP-Boise,ex1)
a function. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: [PHP] function returning true or errors I am writing a function that performs some actions. I would like to return true if the actions

Re: [PHP] function returning true or errors

2002-04-18 Thread Erik Price
On Thursday, April 18, 2002, at 11:56 AM, Jason Wong wrote: What I tend to do is define functions like so: function doo($dah, $dib, $error) { ... I had not even thought about passing an extra parameter by reference -- great idea. Erik Erik Price Web Developer Temp Media