I have an article with text and multiple images in it and need to get just images and just text, separately.
Now I have this code and it just returns last image in article:
preg_match('/<img.+src=[\'"](?P<src>.+?)[\'"].*>/i', $article, $img);
How to select all images and do reverse for getting just text?
Thank you