What is word wrap in PHP?
In PHP, the wordwrap() function is used to wrap a string into new lines when it reaches a specific length.
In PHP, the wordwrap() function is used to wrap a string into new lines when it reaches a specific length.
<?php
$demo_content = 'All the world’s a stage, and all the men and women merely players. They have their exits and their entrances.';
$demo_wrap = wordwrap($demo_content, 15, "<br/>\n", true);
print $demo_wrap;
?>