Home > Archive > PHP Language > March 2004 > Variable into constant.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Variable into constant.
|
|
| Fat Bloke 2004-03-30, 8:32 am |
| In php, how do I turn a variable into a constant value?
I'm thinking particularly here of mysql_insert_id() which I believe changes
if there are intervening queries.
------------------------------------------------------------
This post did not necessarily reflect my opinions. So there.
Sent from within Forte's Agent.
Pull the pins out to reply direct.
| |
|
| On Tue, 30 Mar 2004 13:49:19 +0100, Fat Bloke wrote:
> In php, how do I turn a variable into a constant value?
> I'm thinking particularly here of mysql_insert_id() which I believe changes
> if there are intervening queries.
define('FOO', $bar);
FOO is now your constant.
HTH =)
Regards,
Ian
--
Ian.H
digiServ Network
London, UK
http://digiserv.net/
| |
| Fat Bloke 2004-03-30, 11:32 am |
| >> In php, how do I turn a variable into a constant value?
>
>
> define('FOO', $bar);
>
>
>FOO is now your constant.
>
>
>HTH =)
>
>
>
>Regards,
>
> Ian
Blast your eyes! Why couldn't you have made it something reelly-reelly
complicated that I would have an excuse for not knowing?!
Thank you. May your tribe increase!
------------------------------------------------------------
This post did not necessarily reflect my opinions. So there.
Sent from within Forte's Agent.
Pull the pins out to reply direct.
|
|
|
|
|