> -----Original Message----- > From: David Harkness [mailto:david.h@xxxxxxxxxxxxxxxxx] > Sent: Friday, June 11, 2010 1:13 PM > To: PHP General > Subject: Re: is <?= good? > > On Fri, Jun 11, 2010 at 11:16 AM, Ashley Sheridan > <ash@xxxxxxxxxxxxxxxxxxxx>wrote: > > > For <?= to work, the short_tags setting needs to be turned > on I believe, > > which can cause issues when outputting the XML declaration > line unless > > it's broken into two parts, which is messier than '<?php echo' IMHO. > > > > Can you give an example of how this breaks? I don't see any > problems with > > <?= '<?xml blah blah ?>' ?> > > unless you are trying to validate your PHP script as XML. > Given that PHP is > *not* XML I don't know why you'd want to do that. But I've seen this > argument a few times while looking into this issue so maybe > I'm just not > seeing the big picture. ...and even *IF* it did break for that ONE instance, then simply do as I do in my xml_header.inc.php file: header( "Content-type: text/xml" ); print "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; Problem solved. EVERY other tag in an XML document is just straight up "html" like: <foo>bar</foo> There are no other <?xml tags or anything to worry about. Again the whole XML argument seems to be exaggerated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php