Answers for "replacing last two lcharacter of string php"

PHP
0

string remove last two characters php

echo substr($string, 0, -2);
Posted by: Guest on June-29-2021
1

last item coma replace and php

$likes = 'Apple, Samsung, Microsoft';
$likes = preg_replace("/,([^,]+)$/", " and $1", $likes)
Posted by: Guest on September-07-2021

Code answers related to "replacing last two lcharacter of string php"

Browse Popular Code Answers by Language