in a wordpress php script, I have the following:
echo \'
\' . \
If you're outputting raw HTML to a HTML document (and you want it shown as <b>text</b>
instead of text), you can use htmlentities($string):
htmlentities($slide_media);
If your string is UTF8, you might have to specify this (if your PHP version is 5.4+, you don't have to specify UTF-8, as it's default):
htmlentities($slide_media, ENT_QUOTES, "UTF-8");
You can also strip all HTML tags from the variable by using strip_tags($string):
strip_tags($slide_media);
<?php print_r($slide_media); ?>
should do the trick for you.
To see what is within a variable (maybe it is in array, an object or something else) use print_r($slide_media); or var_dump($slide_media);
print_r Prints human-readable information about a variable
I would do:
echo '<pre>' . var_export($slide_media, true) . '</pre>';
Or maybe
echo '<pre>' . var_export(array_map('htmlentities', $slide_media), true) . '</pre>';
If $slidemedia is an array with html content.