I am using jQuery to produce some text that is coming from my Database.
However I keep getting the jQuery error:
unterminated string literal
My code in raw format looks like :
+ "<div class='operator-details'>"
+ "<strong>Operator:</strong> Stuart"
+ "<br />"
+ "<br /><strong>Phone:</strong> 01"
+ "<br />"
+ "<br /><strong>Contact:</strong> <a href='#'>x@x.com</a>"
+ "</div>"
+ "<div class='featured-venue'>"
+ "<p>Great venue to vistIt is a pleasure to feature it.</p>"
+ "</div>"
The jQuery code is :
+ "<div class='operator-details'>"
+ "<strong>Operator:</strong> <?php echo $venue->user_firstname; ?> <?php echo $venue->user_surname; ?>"
+ "<br />"
+ "<br /><strong>Phone:</strong> <?php echo $venue->user_telephone; ?>"
+ "<br />"
+ "<br /><strong>Contact:</strong> <a href='mailto:<?php echo $venue->user_email; ?>'><?php echo $venue->user_email; ?></a>"
<?php if($venue->venue_website) { ?>
+ "<br />"
+ "<br /><strong>Website:</strong> <a href='<?php echo $venue->venue_website; ?>' target='_blank'><?php echo $venue->venue_website; ?></a>"
<?php } ?>
+ "</div>"
<?php if($venue->venue_featured == 'Yes') { ?>
+ "<div class='featured-venue'>"
+ "<p><?php echo strip_tags($venue->venue_featured_text); ?></p>"
+ "</div>"
<?php } ?>
Is there any way I can correct this error?
Thanks