Jump to content

Line Break In Alert Box Based On Php Variable - Solved With Thanks


niche

Recommended Posts

How do I get the line break to work in an alert box based on data from this php variable?

<?php$myPhpVar = '"Hello again! This is how we" . "\n" . "add line breaks to an alert box!"';echo '<script type="text/javascript">';echo 'alert(' . $myPhpVar . ');';echo '</script>';?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...