I have this code:
$profile_image_url = str_replace(" ", "%20", 'https://www.example.com/images/cropped (1).jpg');
$output .= "style='background:url('https://www.example.com/images/" . $profile_image_url . "')no-repeat;'";
The output results in:
style="background:url(" https: www.example.com images cropped (1).jpg')no-repeat;
How can I fix this line of code to prevent the URL slashes from being removed? Thank you!
$output .= "style='background:url('https://www.example.com/images/" . $profile_image_url . "')no-repeat;'";
I've tried escaping the innermost single quotes with a backslash but it did not work -->
$output .= "style='background:url(\'https://www.example.com/images/" . $profile_image_url . "\')no-repeat;'";