Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    50

    Unanswered: Strange things happening

    Hi!

    I have a simple echo instruction:

    PHP Code:
    echo "<div class=\"chaimage\"><img src=\"images/channels/".urlencode($chaImage)."\"</div>"
    and sometimes it writes the html right but others it's missing the closing quotation marks from the <img src=""> like:

    Code:
    <div class="chaimage"><img src="images/channels/fado.jpg></div>
    How is this possible? Am I missing somethig here?

    Thanks for your attention!
    Ah! Não ser eu toda a gente e toda a parte!

  2. #2
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    34

    Re: Strange things happening

    Try the following instead my friend:

    PHP Code:
    $temp urlencode($chaImage);
    echo 
    "<div class=\"chaimage\"><img src=\"images/channels/$temp\"></div>"
    You were trying to do too many things at once.



    Originally posted by rpOliveira
    Hi!

    I have a simple echo instruction:

    PHP Code:
    echo "<div class=\"chaimage\"><img src=\"images/channels/".urlencode($chaImage)."\"</div>"
    and sometimes it writes the html right but others it's missing the closing quotation marks from the <img src=""> like:

    Code:
    <div class="chaimage"><img src="images/channels/fado.jpg></div>
    How is this possible? Am I missing somethig here?

    Thanks for your attention!
    DigiOz Multimedia
    http://www.digioz.com

  3. #3
    Join Date
    Dec 2003
    Posts
    50
    Although your code is, perhaps, more understandable, it's perfectly possible to do as I was doing.

    But looking to your code I noted what was missing and causing problems - the > closing img tag. I am very tired now (after a marathon in programming) and I wasn't seeing what was obvious.

    Thanks for helping me paying more attention. I guess I should be resting now!!!
    Ah! Não ser eu toda a gente e toda a parte!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •