|
Posted by Dustin on 10/29/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
Navigation:
[Reply to this message]
|