It might be a simple task. But I am new to PHP.
I am creating a string of values getting from database for a specific purpose.
How to remove last char from s
http://php.net/manual/en/function.substr-replace.php
$newstr = substr_replace($longstr ,"",-2);
This will create $newstr by taking $longstr and removing the last tow characters.