Hi, I am getting a PHP string which I need to strip the spaces out of. I have used the following code but when I echo $classname it just displays the string sti
$classname
It could be that the space is not really a space, but other form of whitesspace.
You might want to try:
$classname = preg_replace('/\s+/', '', $fieldname);
From here.