I have php variable which when echoed, blurts out the html. But I was to (somehow!) just get the image code out. Essentially, I want to do a grep on the variable for the image code.
How can I do this? Everything I’ve tried (stripos, strstr) doesn’t work because it prints it all out in html. How can I first just output the code in plain text and not html?
Thanks
Depending on the HTML the variable contains, I would either
strip_tagsfunction: http://php.net/manual/en/function.strip-tags.phpgetElementsByTagNameorgetElementByIdWhere is the info you’re looking for located exactly? Maybe you could post an example.