PHP code
<?php
$content = "check1\r\ncheck2\r\ncheck3\r\nend..."
$order = array("\r\n");
$replace = "\n";
$content= str_replace( $order, $replace, $content);
$smarty->assign('content', $content);
?>
Browse page (smarty template)
<textarea>{$content}<textarea>
Conclusion:
check1\r\ncheck2\r\ncheck3\r\nend...
I expect an exit as shown below
check1
check2
check3
end...
inside the text box. I replaced \r\nwith \n, but even then I can not get the desired result. What is wrong in my code? Thank you in advance.
source
share