0

I WANT TO DISPLAY A CERTAIN WORD I STORED IN DATABASE WITH LETS SAY 14 CHARACTERS(LATTERS),NOW I WANT WHILE DISPLAYING IT AFTER REACHING THE 9TH LATTER TO BRAKE.
SOMTHING LIKE THIS.
MWAKISAMBUKEGE -----
TO GET
MWAKISAMB
UKEGE

If there is apossibility of doing this.Help me please.

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by mrcniceguy
0

I think this is what you are looking for wordwrap($text, 14, "<br />\n", true); modified to add the 4th argument to the function for hard break.

0

do you mean i need to write like this????
$query="SELECT *FROM rad ";
$result="mysql_query($query)";
while($row=mysql_fetch_array($result)){
$text=$row;
echo"wordwrap($text, 14, "<br />\n", true);"
}

1

Close.
Like this

$query="SELECT *FROM rad ";
$result="mysql_query($query)";
while($row=mysql_fetch_array($result)){
$text=$row['text'];
echo wordwrap($text, 14, "<br />\n", true);
}

The only change I made was fixed misplaced semicolon in last line and took out the double quotes.

Votes + Comments
you are smart guy....
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.