PHP data-lightbox inserter

This script automatically inserts the attributes and the <a> tag for all images in a string for making a lightbox gallery