Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 27th, 2003, 04:37 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
Chars with no space

Ok having difficulty here!!!

I have a table, with a table within a table.
The tables are set up with html and php.

My problem is that when characters are entered into the textbox, or textarea I should say, and then the screen is viewed after the input is entered into the database, the tables alter in width and size to adjust to the characters, rather then breaking them apart.

Is there some quick code I can use to break apart a string of characters that do not have an break or space entered in order to prevent the browser from getting a scroll bar and adjusting my tables to suit the characters??

I tried wrap it didn't work. I tried no scrollbar, it didn't work.

Any other ideas?

Reply With Quote
  #2  
Old August 27th, 2003, 04:47 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: Chars with no space

you would want to check the input before it's entered into the database.. for example:
php Code:
Original - php Code
  1.  
  2. if(strlen($input) > 160)
  3.     $input = wordwrap($input, 160, '<br />', 1);

Reply With Quote
  #3  
Old August 27th, 2003, 05:13 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
RE: Chars with no space

ok so curiously why 160?
I'm working with it and I am getting an error that says:
wordwrap() expects parameter 2 to be long, string given in "file" on line "line".

Reply With Quote
  #4  
Old August 27th, 2003, 05:15 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
RE: Chars with no space

I got it working!!!
Thanks so much!
I'd never heard of the wordwrap function before.

Reply With Quote
  #5  
Old August 27th, 2003, 07:54 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
RE: Chars with no space

Ok So how can I reverse it?
So that on the form where thy update, and the information prints out with the <br />
It doesn't actually print out with the <br />?

Reply With Quote
  #6  
Old August 27th, 2003, 08:19 PM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
RE: Chars with no space

you might want to do this:

str_replace("<br />", "/n", $input);

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Chars with no space


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT