-1

I am getting the following error:

Parse error: syntax error, unexpected ''< / p >' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in C:\wamp\www\napier_pull\index.php on line 213

My code is as follows:

echo'<div id="myModal'.$title_clean.'" class="modal fade">
     <div class="modal-dialog">
     <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
         <h3 class="modal-title modal-top-health">'.$row["title"].'</h3>
         </div>
     <a href="'.$row["linktitle_1_url"].'">'.$row["linktitle_1"].'</a>
     <p>'.$row["linktitle_1_desc"]'</p>
     </div>
    ';

Line 213 is the last line, however I feel like the problem is in the P tag just before the end. I added spaces to the P tag in the error as it wasn't showing up. I know I've probably left a quote somewhere wrong but no idea where, any ideas?

ladanta
  • 459
  • 2
  • 6
  • 18

1 Answers1

1

You're missing a dot (.) for right concatenation:

echo '<div id=" // ...
// ...
<p>'.$row["linktitle_1_desc"].'</p> // << note the second dot
</div>';
D4V1D
  • 5,805
  • 3
  • 30
  • 65
  • Not sure why this was downvoted, its correct! Thank you. – ladanta Mar 30 '15 at 09:23
  • Got 6 downvotes in 1 minute on multiple answers of mine.. – D4V1D Mar 30 '15 at 09:24
  • @D4V1D Maybe a meta post about it? Must be the same person. I notice you have alot of downvotes on different posts today – Loko Mar 30 '15 at 09:39
  • @Loko Just did it and it was flagged as duplicate of this question. I should get my rep back as per the answer: http://meta.stackoverflow.com/a/252271/2788131 – D4V1D Mar 30 '15 at 09:39
  • 1
    @D4V1D Yes and if the 24 hours are over and you still didn't get the rep back, please do flag one of your posts and flag it as other like the answer says. These kind of people should just get a ban. – Loko Mar 30 '15 at 09:41