You are here: Re: trouble with echo <br /> « PHP Programming Language « IT news, forums, messages
Re: trouble with echo <br />

Posted by Lars Eighner on 12/05/05 19:23

In our last episode,
<qLmdnbMArce17AnenZ2dnUVZ_tidnZ2d@comcast.com>,
the lovely and talented Khai
broadcast on comp.lang.php:

> Ok - it seems that PHP has a Tidy library that tries to validate/repair
> html. Since <br /> is expected to have a <br>, it's replacing it with a
><br>.

There are tidy functions in php, but if you are not invoking
them, I don't see how they would affect things. I suspect that
tidy is being run externally on your output. Before looking
any deeper in php, be sure your doctype declares xhtml and try
using a .tidyrc with an xhtml doctype option.

> Even if it's written outside <?php ?>, or echo from inside, it still puts
><br> instead of just <br />.

Just echoing or printing tags should not do anything with php's
tidy functions, which seem to be some kind of object-oriented
crap.

> Is there a way around this, rather than writing <br> <br /> every time I
> want a break?

See if this happens in documents generated by php cli. I bet it
doesn't. If it doesn't, there is some kind of post processing
going on. If it is nice, it should get the right answer if you
provide the right doctype and/or .tidyrc .

--
Lars Eighner usenet@larseighner.com http://www.larseighner.com/
Good Morning, Carnivore! - Anthrax botulin nuclear flight mail Akbar reservoir
Ramadan letter activate bridge Abdul safehouse virgins money detonators Allah
smallpox Glaspie Springfield agent airport dispersal facility counterfeit

 

Navigation:

[Reply to this 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

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