<?php $html = '<div class="media_embed" height="qqq" width="www"> <a href="http://giphy.com/gifs/dancing">via GIPHY</a> <div class="media_embed" height="eee" width="rrr"> <a href="http://giphy.com/gifs/movie">via GIPHY</a>'; echo $html = preg_replace("/<a href=\"(.*)\">.*<\/a>/", "<figure><img src='$1' /></figure>", $html);
You have javascript disabled. You will not be able to edit any code.