# \[php\] PHP seems to parse HTML

**URL:** <https://forum.kirupa.com/t/php-php-seems-to-parse-html/189604>\
**Category:** Uncategorized\
**Created:** [June 4, 2006, 2:37pm UTC](https://forum.kirupa.com/t/php-php-seems-to-parse-html/189604 "2006-06-04T14:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sliker\_Hawk](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sliker\_Hawk](https://forum.kirupa.com/u/Sliker_Hawk)\
**Post date:** [June 4, 2006, 2:37pm UTC](https://forum.kirupa.com/t/php-php-seems-to-parse-html/189604/1 "2006-06-04T14:37:55Z")

</div>

This is starting to get really annoying.  
If I try something like:

```auto
echo '<img src="test.jpg" alt="test" />';

```

The /\> is replaced with \>. If I try:

```auto
echo '<img src="test.jpg" alt="test"></img>';

```

is completely removed. This one makes even less sense to me:

```auto
echo '<img src="test.jpg" alt="test" afhfa>';

```

Will output: \<img src=“test.jpg” alt=“test” afhfa=""\>.

What’s going on?

It’s even worse [here](http://envant.freehostia.com/chatBox/). On that, I have a function which deletes the messages, and you’ll see that there’s a time at the end of the messages which is encased within \<span class=“tiny”\>. I had to do alot of piddling around to get PHP to parse that correctly, but, when I echo the result out, even though the message currently in the box and the result _look_ exactly the same, PHP refuses to accept the fact that they’re EXACTLY THE SAME!  
A ‘if ($cAll == $all)’ test fails every time.

… Thanks.
