View Single Post
Old 07-22-2008, 07:25 PM   #2 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Nevermind, figured it out.

I need to remove the quotes from the constant definition.

PHP Code:
define('EXPIRE''60*60*24*14'); // doesn't eval
define('EXPIRE'60*60*24*14); // does 
...oy. Next question then, if you're defining a constant using variables, such as from a database:

PHP Code:
while ($row mysql_fetch_assoc($pResult)) {
    
define($row['cfg_name'], $row['cfg_value']);

It seems to assume that the values are quoted. Is there a way to tell it not to for certain values? Hmmm...
-m
delayedinsanity is offline  
Reply With Quote