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 still with the spaces in it.
<?php
$fieldname = the_sub_field('venue_title');
$classname = str_replace(' ', '', $fieldname);
echo $classname;
?>