Any Idea what would be wrong with this please? Please help this is really fustrating me, Im not very good at php
            Asked
            
        
        
            Active
            
        
            Viewed 36 times
        
    -4
            
            
        - 
                    4You're embedding HTML directly in your script file without dropping out of PHP – Mark Baker Oct 27 '15 at 23:37
- 
                    how can I correct this please? – Michael Mulligan Oct 27 '15 at 23:39
- 
                    To know for sure, include your source code, though @Mark is probably correct, or you've got an open php tag `` – RyanS Oct 27 '15 at 23:40
- 
                    This is my first time using Stackoverflow im not sure how to add the code thats why i added the picture sorry, – Michael Mulligan Oct 27 '15 at 23:43
- 
                    Welcome to Stack Overflow. I posted an answer. From the image, you're already doing the right things in other parts of your code. You just need to add `echo` like is being done else where. – Twisty Oct 27 '15 at 23:49
- 
                    Sorry for being anoying but where do I add echo to? @Twisty – Michael Mulligan Oct 27 '15 at 23:55
- 
                    Line 102 if you can't find it. – Twisty Oct 28 '15 at 00:06
- 
                    I added this to Line 102 but still not working, unexpected end on line 139 – Michael Mulligan Oct 28 '15 at 00:17
- 
                    Follow this link to post ur code on stackoverflow. http://meta.stackexchange.com/questions/22186/how-do-i-format-my-code-blocks – vishalkin Oct 28 '15 at 01:25
- 
                    I also see that ur running your php script directly in the browser without any host. use WAMP, XAMPP to run your script. – vishalkin Oct 28 '15 at 01:27
- 
                    I can't see line 139 from your image. I do see line 107 also had the same problem and I suspect some line before 139 starts a new PHP Block and it is never closed, that line 139 is the end of your code I bet. Please follow the guide from @vishalkin – Twisty Oct 28 '15 at 15:56
1 Answers
1
            
            
        You cannot include HTML Code directly in your PHP code.
To fix, you must use a command like echo, print(), or break from your PHP Code. This would require a PHP end block:
} else {
?>
<TD>
Or:
} else {
    echo "<TD>";
 
    
    
        Twisty
        
- 30,304
- 2
- 26
- 45
