Hi All,
I need code to chop last letter from a string if the last letter is alphabet "s"
so, I have $term = 'cars';
chop($term);
it returns car which is ok but if the term is say "manhattan" or something else that doesn't end in "s" I want the term as is.
Thanks
I need code to chop last letter from a string if the last letter is alphabet "s"
so, I have $term = 'cars';
chop($term);
it returns car which is ok but if the term is say "manhattan" or something else that doesn't end in "s" I want the term as is.
Thanks