RE: [PHP] Constants in strings

From: Date: Wed, 06 Jul 2011 14:49:03 +0000
Subject: RE: [PHP] Constants in strings
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-313953@lists.php.net to get a copy of this message
> >define('DIR_JAVA', '/js/'); > >When you need to use the JavaScript directory you can do this. ><script src="<?php echo DIR_JAVA . >'jquery-1.5.1..js';?>"></script> > >There is no true need for the curly brackets to echo out the value of >the constant. > Except for when you're using heredoc, much like in the OPs first post... Thanks, Ash http://www.ashleysheridan.co.uk -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.

« previous php.general (#313953) next »