Results 1 to 3 of 3

Thread: Printing in PHP - speechmark errors

  1. #1
    Join Date
    Jun 2005

    Printing in PHP + AJAX - speechmark errors

    This is a really silly one, but I'm getting stuck - can anyone point out the mistake?

    I have the following code:

    print "<class=\"navItem_$num_commas\"><img src=\"images/folder_closed.gif\"><a href=\"#\" onclick=\"amend($idL2,'Side')\">$TitleL2</a></class>";
    which should print out something like:

    <class="navItem_0"><img src="images/folder_closed.gif"><a href="#" onclick="amend(2,'Side')">Home</a></class>
    It doesn't however... it prints the same, but when closing the class tag, it prints </class="navItem_0"> - eg:

    <class="navItem_0"><img src="images/folder_closed.gif"><a href="#" onclick="amend(2,'Side')">Home</a></class="navItem_0">
    And thus the class doesn't seem to actually work in any way (ie it doesn't refer to the file's CSS). What's going wrong?

    Thanks again!
    Last edited by nickisme; 06-20-2006 at 05:15 AM. Reason: More specific title

  2. #2
    Join Date
    Apr 2005
    Bathurst, NSW, Australia
    Doesn't make sense - was the code above copied and pasted?

  3. #3
    Join Date
    Jun 2005
    Yeah, it was the source code as shown in FF. Don't know if this makes a difference, but it's using AJAX - this code is returned from the server... still can't think why that would make any change though...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles