3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $app['additional_images']="https://www.google.com/images/srpr/logo11w.png"; $app['product_url']='<a href="http://www.example.com/product.html">The product</a>'; $temp_arr = explode(">",$app['product_url']); $reconstruct_link_opening_tag=$temp_arr[0].">"; $reconstruct_link_closing_tag="</a>"; // your code..... if (!empty($app['additional_images'])) echo'<span>'.$reconstruct_link_opening_tag.'<img src="'.$app['additional_images'].'">'.$reconstruct_link_closing_tag.'</span>';
Output for 4.3.0 - 7.1.0
<span><a href="http://www.example.com/product.html"><img src="https://www.google.com/images/srpr/logo11w.png"></a></span>