remove last semicolon from string in php code example
Example 1: remove last comma from string php
rtrim($my_string, ',');
Example 2: remove last letter php
<?php
echo substr('abcdef',0, -1); // abcde
?>
rtrim($my_string, ',');
<?php
echo substr('abcdef',0, -1); // abcde
?>