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
* 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 (
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
3 matches
Mail list logo