Re: Quick questions <?=something?>

From: Date: Mon, 06 Dec 2004 15:20:27 +0000
Subject: Re: Quick questions <?=something?>
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-203595@lists.php.net to get a copy of this message
* Marek Kilimajer <lists@kilimajer.net>: > Ryan A wrote: > > Hey all, > > Am a bit confused, from the time I learnt PHP (big thanks to this list for > > helping me) I have used something like this > > <?php echo $something; ?> > > but when reading someone elses code I sometimes stumble accross this: > > <?php=something?> > > is this 100% valid php? > > I have not found it in the manual... (also am not sure if the above example > > needs a $ symbol...) > > <?= $string ?> > > means the same as > > <?php echo $string ?> > > if short_open_tag is on And since you cannot always count on that being on, it's more platform independent to use the <?php echo ....; ?> construct. -- Matthew Weier O'Phinney | mailto:matthew@garden.org Webmaster and IT Specialist | http://www.garden.org National Gardening Association | http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org

« previous php.general (#203595) next »