I have some checkbox options which return values like this:
address1, address2, postcode
I’d like to remove the commas in the returned values and replace with a line break.
This is where I’ve got to, alas it doesn’t work. <?php echo str_replace(', ', '<br />', get_field('myfield', 'option')); ?>
so the if I check selectA the whole value I get back is “address1, address2, postcode3” rather than an array (I think).
That’s the part I’d like to remove the commas and replace with a line break.