Jump to content

Removing a dash from the end of $title


jeffkas

Recommended Posts

I'm trying to remove a dash at the end of a title, for the times when a dash appears there (which isn't always).

 

Since my titles are always different lengths, I don't think substr will work.  How can I code the following... 

 

If $title ends with '-', replace with ''

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/225647-removing-a-dash-from-the-end-of-title/
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.