I have this string:
<h1>title</h1>
<p>hello world</p>
<img class="size-full wp-image-3824 alignright" src="https://alimentosysuplementos.com/wp-content/uploads/2017/07/Sándwich-con-queso-asado-arándanos-y-fresas..jpg" alt="Sándwich con queso asado, arándanos y fresas." width="360" height="450" />
I have to convert it to this:
title
hello world
https://alimentosysuplementos.com/wp-content/uploads/2017/07/Sándwich-con-queso-asado-arándanos-y-fresas..jpg
How to do it dynamically for several strings like this one???...
I'm working on an API to get the posts from a regular wordpress site and send it to a mobile app, because of that I have to remove all the HTML but keep the content.
I'm using Laravel 5.5 - PHP 7.1
Someone could help me pleaseee! :)