PHP

Remove the comma from beginning or end of string with php

Remove the comma from beginning or end of string with php


Remove the comma from beginning or end of string with php

Here is how to remove the comma from beginning or end of string with php:

right part of string:

$string = rtrim($string, ',');

left part of string

$string = ltrim($string, ',');

Published: 1st June 2016 by

Adverts