Current location: Hot Scripts Forums » Programming Languages » PHP » Help with word wrapping . Please Help


Help with word wrapping . Please Help

Reply
  #1 (permalink)  
Old 12-22-05, 02:10 PM
Oliii Oliii is offline
New Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Help with word wrapping . Please Help

Hello, Im new to this forum and php as well but not a n00b.
I do have this guestbook script accelGbook (http://www.russeldesign.com/2005/11/23/accelgbook/ ) made in php.
I succesfully integrated it in my page but if I write a long reply in the guestbook ,without pressing the enter, it brakes my layout of the page.
So after submiting the reply the page looks like crap.
I ve downloaded a word_wrap php file but I dont know exactly where to use it.
Please help me

Thank you very much
Reply With Quote
  #2 (permalink)  
Old 12-23-05, 04:20 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
this is the function you have to use:
PHP Code:

string str [, int width [, string break]];

//example:
$str "hello i need to split this after 15 lines";
$str2 wordwrap($srt15"<br />\n");
//output= hello i need to<br /> split this <br />after 15 lines<br /> 
Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 12-24-05, 03:26 AM
Oliii Oliii is offline
New Member
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
but where do I have to put this function in my php script??
Because I want it to be used not just once.
I d like to wrap all the long posts the people submit ,every time.
Reply With Quote
  #4 (permalink)  
Old 12-24-05, 03:48 AM
Richard's Avatar
Richard Richard is offline
Wannabe Coder
 
Join Date: Sep 2005
Location: Oxford, UK
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Have you tried the function I posted here?. The 'nl2br' one
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Filter in PHP seanknighton Script Requests 0 10-31-05 06:44 PM
Telephone Word Generator necro_mancer C/C++ 4 09-07-05 04:01 PM
Export Mysql to Excel mcrob PHP 8 07-12-05 06:49 AM
Find the beginning letter of a word mcrob PHP 6 05-23-05 10:06 AM
what is the best method to find last word in variable ? GS300 PHP 6 09-15-04 09:13 PM


All times are GMT -5. The time now is 06:23 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.