/ Published in: PHP

This is a very common PHP question of HOW TO remove last character from string in PHP. Find below some ways how to delete last character from string in PHP.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // method 1 - substr and mb_substr // method 2 - substr_replace // method 3 - rtrim // it trims all specified characters from end of the string ?>
URL: http://www.apphp.com/index.php?snippet=php-remove-last-character-from-string
Comments
