embedded HTML in php code with 5.1.1

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
would anyone please tell me why this code works in 4.X, 5.0.X and not in  

function myfunction(){

    *** php code ***
    <a href="bla.bla">bla</a>
    *** php code ***



when i run it under 5.1 i get the error "Parse error: syntax error,  
unexpected $end in" on the last line of the file.  i drop the embedded  
html and it works fine.

i know doing it this way is kinda sloppy and on my list of things to  
fix, but that can't be done right now.  is there some setting in 5.1  
where i can turn this back on or do i have to downgrade to 5.0 again.


Re: embedded HTML in php code with 5.1.1

Bob Marley wrote:
Quoted text here. Click to load it

Most likely, it has nothing to do with PHP version, but rather with
your use of "<?" opening tag.  Change it to "<?php" and see if it
solves the problem.  If it does, it means your short_open_tag directive
is set to 0 and you must either change all "<?" tags to "<?php" tags or
set short_open_tag to 1.  


Site Timeline