remove last character from string symfony code example Example: remove last letter php <?php echo substr('abcdef',0, -1); // abcde ?>