I am using a loop to get values from my database and my result is like:
'name', 'name2', 'name3',
And I want it like this:
'name', 'name2', 'name3'
I want to remove the comma after the …
Is there a PHP function that can extract a phrase between 2 different characters in a string? Something like substr();
Example:
$String = "[modid=256]";
$First = "=";
$Second = "]";
$id = substr($string, $First, $Second);
Thus $id would be 256
Any help would be appreciated :)
I need to delete the first 3 letters of a string and the last 3 letters of a string. I know I can use substr() to start at a certain character but if I need to strip both first and last characters …