Forum Moderators: coopster
I have been struggling with this one for the last day and a half and made some great progress, but I am stuck on one thing.
Currently I have a website that has articles on it and the 'index' of these articles takes the 4 more recent articles and pulls the first image out of it and makes a thumbnail for the listing. I am getting the img src with this:
preg_match('/<img.*?src=([\'"])([^"\1]+)\1/i', $article_result['article_content'], $match);
The issue I am having now is that I want to also grab the alt tag from the image in the content so that I can use it on the thumbnail.
Any suggestions on how I can modify the regex to grab the Alt tag?