in a wordpress php script, I have the following:
echo \'\' . $slide_media . \'\' . \
I would do:
echo '' . var_export($slide_media, true) . '';
' . var_export($slide_media, true) . '
Or maybe
echo '' . var_export(array_map('htmlentities', $slide_media), true) . '';
' . var_export(array_map('htmlentities', $slide_media), true) . '
If $slidemedia is an array with html content.