Re: [PHP] Constant questions

2004-05-19 Thread Don Read
On 12-May-2004 René Fournier wrote: > Hi, > > I have two questions involving Constants. > > 1. I want to refer to a refer to a Constant by its value (which is > unique), and return its name. E.g.,: > > define ("SEND_DS","1"); > define ("SEND_DS_ACK","2"); > define ("RESEND_DS

Re: [PHP] Constant questions

2004-05-12 Thread Curt Zirzow
* Thus wrote Ren Fournier ([EMAIL PROTECTED]): > Hi, > > I have two questions involving Constants. > > 1. I want to refer to a refer to a Constant by its value (which is > unique), and return its name. E.g.,: > > define ("SEND_DS","1"); > define ("SEND_DS_ACK","2"); > define (

Re: [PHP] Constant questions

2004-05-12 Thread Richard Davey
Hello René, Wednesday, May 12, 2004, 6:29:13 PM, you wrote: RF> Such that the output will be MY_NAME. If I echo $val, the output will RF> be Rene. But I want to see the constants Name, not Value. Any ideas? No easy way I can think of, but you could do: $array = get_defined_constants(); and the

[PHP] Constant questions

2004-05-12 Thread René Fournier
Hi, I have two questions involving Constants. 1. I want to refer to a refer to a Constant by its value (which is unique), and return its name. E.g.,: define ("SEND_DS","1"); define ("SEND_DS_ACK","2"); define ("RESEND_DS","3"); define ("STARTUP_DS","12"); For exa