2
Colleagues.
We are creating a new system and removing the WP, but the news will still pick up from the WP, as old news. Only when we bring the column post_content, it brings me the tag that appears next to the image:
[caption id="attachment_9472" align="alignleft" width="350"](here image appears)[/caption]
I tried to use strip_tags, but it didn’t work. We’re taking without using WP, but our own system. How do I remove these tags and leave only the image?
I’m taking it this way:
<?php echo utf8_encode(strip_tags($jmVisualizar->post_content),'[caption]'); ?>
Perfect Bacco, it worked! Thank you very much.
– user24136
@Fox.11 I usually avoid using Regex for no reason, but in this particular case, it is a very suitable tool to do the job. I’ve left a few examples at IDEONE, so you can see which one pays more for your case, but any questions, let me know.
– Bacco
Combined......
– user24136