NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing a variable to a constant

Randal Rust randalrust at gmail.com
Mon Jul 17 15:48:25 EDT 2006


I'd like to pass a variable to a constant, like so:

$imageDir='/uploads/'.$orgID.'/images/';
define('IMAGE_PATH_DIRECTORY', $imageDir)

It doesn't seem to be working. Every time I check the value, the
$orgID is missing. I can print it to the screen (it's held in the
$_SESSION), so I know it's there. My guess is that I just can't do
this, and I'm not finding anything via Google or php.net that tells me
otherwise.

-- 
Randal Rust
R.Squared Communications
www.r2communications.com



More information about the talk mailing list