spyrosoft / php-format-html-output

A simple HTML pretty printer written in PHP
25 stars 30 forks source link

Passing different values many times on a page appends previous content #1

Closed iantearle closed 11 years ago

iantearle commented 11 years ago

Hi, I am calling HTML() a few times on my page, but on the subsequent times it is appending the first instance to the result. I may be missing something really simple, but cant see it staring at my screen this morning.

$format->HTML($items->descr) - is fine.

$format->HTML($items->dates) - has the dates plus the descr appended before its output.

spyrosoft commented 11 years ago

Good catch, Ian! Thanks. It needed a line to set $this->output back to an empty string at the beginning of the $format->html() function.

-- Bennett

On 2/15/13 3:49 AM, Ian Tearle wrote:

Hi, I am calling HTML() a few times on my page, but on the subsequent times it is appending the first instance to the result. I may be missing something really simple, but cant see it staring at my screen this morning.

$format->HTML($items->descr) - is fine.

$format->HTML($items->dates) - has the dates plus the descr appended before its output.

— Reply to this email directly or view it on GitHub https://github.com/spyrosoft/php-format-html-output/issues/1.