How do I prevent "<br />" from being added? (1 post)

  1. DesertLord
    Posted 11 years ago #

    I created a page with php code and it's working pretty good, problem is either wordpress or php is trying to be helpful by adding "
    " when I don't want it to. What is causing that? Here's an example (hopefully it displays right).

    My code:
    $image_block .= "<img src=\"/images/$gallery/thumbs/$image \" alt=\"$comment\"/> ";

    And the result:
    <img src="/images/diablo/thumbs/144-4429_IMG.JPG " alt="Chassis Progress< br />

    The problem is the break at the end of the alt tag. I added a space to the beginning of it so it would display.

Topic Closed

This topic has been closed to new replies.

About this Topic