We Must Design Posted July 20, 2007 Share Posted July 20, 2007 I am wanting to remove the last character of a string, for example I want to change: 1|2|3|4| to 1|2|3|4 Could I get php to automatically remove this last character? Any guidence appreciated! Quote Link to comment Share on other sites More sharing options...
hvle Posted July 20, 2007 Share Posted July 20, 2007 $str = substr($str,0,(strlen($str)-1)); Quote Link to comment Share on other sites More sharing options...
We Must Design Posted July 20, 2007 Author Share Posted July 20, 2007 Thankyou for your reply, I will try this now Quote Link to comment Share on other sites More sharing options...
We Must Design Posted July 20, 2007 Author Share Posted July 20, 2007 worked a treat, thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.