I have searched everywhere but can\'t find a solution that works for me.
I have the following:
$bedroom_array = array($studio, $one_bed, $two_bed, $t
Here's another way to do the replacement with a regular expression using a positive lookahead which doesn't require a backreference:
$bedroom_list = preg_replace('/,(?=[^,]*$)/',' &', implode(', ', $bedroom_array));