Thanks Jason this now validates and has the alt tag as requested see below:
echo '<a href="' . $gallery['images'][$i]['fullsize']['url'] . '" rel="lightbox-pg' . $random . '" >
<img alt="' . str_replace('"', '\"', $gallery['images'][$i]['title']) .'" title="' . $i . '##' . str_replace('"', '\"', $gallery['images'][$i]['title']) . '##' . str_replace('"', '\"', $gallery['images'][$i]['description']) . '" src="' . $gallery['images'][$i]['thumb']['url'] . '" width="62" height="62" /></a>';
Although I do get this as a warning:
Line 222, Column 111: Bad value 001_782p.jpg for attribute href on element a: Path component contains a segment /../ not at the beginning of a relative reference, or it contains a /./. These should be removed.
…p://www.canopiesuk.com/../gallery/images/1/001_782p.jpg" rel="lightbox-pg785" >