| | |
Is there anything like this in php???
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I think this is what you are looking for
modified to add the 4th argument to the function for hard break.
wordwrap($text, 14, "<br />\n", true); modified to add the 4th argument to the function for hard break.
Last edited by R0bb0b; Oct 14th, 2008 at 2:28 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Close.
Like this
The only change I made was fixed misplaced semicolon in last line and took out the double quotes.
Like this
php Syntax (Toggle Plain Text)
$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.
Last edited by R0bb0b; Oct 14th, 2008 at 2:58 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
- Project available for PHP Developer (Web Development Job Offers)
- PHP/MySQL Programmer Position (Web Development Job Offers)
- Are you a PHP and Javascript junkie? It's time you met Emma. (Software Development Job Offers)
- PHP MYSQL Developer Position Available (Web Development Job Offers)
- PHP Web Programmer (Post your Resume)
- PHP / My SQL Web developer (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: Restrict Access after update
- Next Thread: HAVE A LOT OF THANK YOU VERY MUCH thái san
| Thread Tools | Search this Thread |
apache api array basic beginner binary broken cache cakephp checkbox class cms code computing confirm cron curl customizableitems database date delete display dynamic echo email error external file files filter folder form forms forum function functions gc_maxlifetime google headmethod host howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction memmory memory menu mlm multiple mysql navigation oop parsing paypal pdf php phpmysql problem query question radio random recursion remote script search select server sessions sms snippet source space sql syntax system table thesishelp trouble tutorial update upload url validator variable video web youtube





