Code: Select all
<?php
$text = " <p>Some text here</p>
<p>Some more text here</p>";
?>
<script>
var mystring = "<?php echo trim ($text); ?>";
</scriptModerator: General Moderators
Code: Select all
<?php
$text = " <p>Some text here</p>
<p>Some more text here</p>";
?>
<script>
var mystring = "<?php echo trim ($text); ?>";
</scriptCode: Select all
window.onload = function () {
var val = '<?php echo trim (TEXT_INFORMATION); ?>';
var testFrame = document.getElementById("myFrame");
var doc = testFrame.contentDocument;
if (doc == undefined || doc == null)
doc = testFrame.contentWindow.document;
doc.open();
doc.write(val);
doc.close();
}Code: Select all
<p>Some text here</p><p>Some more text here</p>Code: Select all
<p>Some text here</p>
<p>Some more text here</p>Code: Select all
<?php
//this will remove all new lines
$text = str_replace("\r\n","",$text);
//this will change all new lines to line breaks (html)
$text = nl2br($text);
?>