What is wordwrap() Function in php ?
wordwrap() Function wrap a string into incipient lines when it reaches a concrete length.
So,basicaly use of wordwrap() wraps a string into new lines. wordwrap() include space also.
You can take reference form below example to wraps a string into new lines.
<?php
$textword = "Hello Mr.Jorden how are you ? I hope you are doing well.";
// here $textword is a variable
//now use the wordwrap() for incipient lines and define lenth of word
$textword = wordwrap($textword, 10, "<br />");
print $textword;
// print the $textword variable
?>
so in wordwrap() we use 10 limit of length of word and wordwrap() contain space also
then, output will come following:
Hello
Mr.Jorden
how are
you ? I
hope you
are doing
well.
0 Comment(s)