...

View Full Version : define a constant using echo



zodehala
02-16-2008, 09:12 PM
why this code gives error ?


define(CSS , echo '<link href="style.css" rel="stylesheet" type="text/css">',FALSE);

shyam
02-16-2008, 09:26 PM
because the second argument to the define (http://php.net/define) must be a string and the echo (http://php.net/echo) method returns void

try

define(CSS , '<link href="style.css" rel="stylesheet" type="text/css">',FALSE);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum