Sign in to follow this  

[web] wrapping text

This topic is 4382 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I am not sure if this is m,ysql/php/css issue. I have a working php script that reads in the 30 newest news items form mysql database and print them on on the websites along with css for formatting. What I started to notice after add php and mysql is that if I write none stop test no white line like: hasdofajshadbjckbnawergkasnbdrkahgsdknbfckashgfaksygdrkjbrsadkhsvjhzxnbfvawkjsrgaksjdbnfknasbfkjshgadfkbv That test goes over the potion of space it should, it is like the text will not "wrap" if there is no space. is there a way a wrapping text even if there is no space?

Share this post


Link to post
Share on other sites
You could break it up server-side. Take a look at PHP's wordwrap() function. Also look at the attached comments on that manual entry. It has several user-written wrapping functions you could use instead of wordwrap().

Share this post


Link to post
Share on other sites
In PHP, I just wrote a simple (perhaps slow) word-wrapping function myself, where I can have my own max-chars-per-line and which characters it can break (so not only on spaces). I guess there still isn't an attribute that does this for you.

Share this post


Link to post
Share on other sites

This topic is 4382 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this