Jump to content

WordWrap


SieRobin

Recommended Posts

Are you saying that you want to display text, however once the text reaches a certain length to stop outputting that text and include elipses instead?

For example, the text "Hello, World!  Today I went shopping." would be displayed as "Hello, World! Today ..."
Link to comment
Share on other sites

Right the number I set is when it's adjusted to wrap the words, correct? Well the way it's set up is with an if else statement, but the else continuously kicks in, the if statement is pretty much useless.

If you actually look at the script, you'll see where it basically says, if the text exceeds the count forget everything thereafter and input "..." else output nothing. Doesn't work.
Link to comment
Share on other sites

Is it possible to use the above example to do this?

I have urls stored in a database and I echo them in a table column but some urls are so long it makes the other 2 columns really short.  I would like to use the above example to shorten the length of the outputted url so instead of having something like [url=http://www.somesite.com/products/something/this/that/something.php]http://www.somesite.com/products/something/this/that/something.php[/url] it displays it as [url=http://www.somesite.com/products/...]http://www.somesite.com/products/...[/url] but still has the full length url so if clicked it still works
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.