Reply to Re: The Dark Side of short tags (Was: nOOb question...)

Your name:

Reply:


Posted by Dustin on 10/10/75 11:25

Kimmo Laine wrote:
> "ZeldorBlat" <zeldorblat@gmail.com> kirjoitti
> viestissä:1125496435.748162.26960@g14g2000cwa.googlegroups.com...
>
>>Yeah, that's how I would normally write it...with the short tags. But
>>I figure if you're just learning, you might as well get into the habbit
>>of the full open tags since people these days seem to think that
>>they're bad :)
>
>
> They are bad, at least if you're writing (or trying to write) xhtml
> compatible code. There you need the xml declaration row <?xml version="1.0"
> encoding="UTF-8"?>. If short tags are on, and the xml declaration is in a
> php file, it's concidered as php. And since 'xml version="1.0"
> encoding="UTF-8"' makes no sense in php, it raises an error. I've done a few
> times so that I echo the xml tag , ie <?= '<?xml version="1.0"
> encoding="UTF-8"?>' ?>, but that again is bad practise. It would be better
> to leave short tags out and write proper code.
>

Well maybe xhtml standards should be more considerate of php short tag
users! ;)

--
Dustin Davis
Freelance Portal: http://www.nerdlance.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация