Jump to content

substr query


e1seix

Recommended Posts

Right I have the basic grasp of this, however what I want to use it for is... if the return of a string is GREATER than the specified

($string = substr($name,0,75);

in this case 75 digits, I want to put a "..." after to show the name is not showing in full as opposed to an abrupt stop mid-word when it's printed 75 digits. Easy, put "..." after printing $string. However, there will be other strings that do not exceed 75 digits and so "..." looks a bit silly after it.

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/133391-substr-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.