Need some help with PHP embedded in HTML

Discussion in 'OT Technology' started by Jonny Chimpo, Oct 20, 2004.

  1. Jonny Chimpo

    Jonny Chimpo OT Supporter

    Joined:
    Dec 20, 2003
    Messages:
    64,722
    Likes Received:
    362
    Location:
    The sweaty asshole of the universe
    I'm trying to take a chunk of PHP code and embed it in an HTML document. I've tried everything I can think of to get it to parse correctly with no success.

    What I currently have is a basic HTML document with a table and in one cell I've opened PHP with the following:

    everything is groovy until it hits this line:

    It seems to barf on the '>' for obvious reasons. But I thought the XML tag would get around that. Apparently not. Any suggestions? This is my first forray into this level of code so be gentle. ;)

    For reference the resulting page looks like this: http://jeep.websitewelcome.com/~jtt/gallery/gallery.htm

    TIA
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Are you calling the file .php or .html? If you call it .php it should parse just fine. PHP is almost always embedded in HTML.
     
  3. GotVtec

    GotVtec 8th World Wonder

    Joined:
    Mar 14, 2000
    Messages:
    575
    Likes Received:
    0
    Location:
    Omaha, NE
    replace
    PHP:
    echo '<?xml version="1.0" ?'.'>' 
    with
    PHP:
    echo '<?xml version="1.0" ?'.'>'; //you needed a semicolon here
     

Share This Page