Jump to content

Regex to get src together with href


etrader

Recommended Posts

This may not be exactly what you are looking for, but hope it helps:

 

$array = your image array here

$rowHtml = "";

foreach($array as $filename){

$rowHtml = $rowHtml . "<ul>";

$rowHtml = $rowHtml . "<li><a href=\"$filename\">$filename</a></li>";

$rowHtml = $rowHtml . "</ul>";

}

print $rowHtml;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.