I have about a hundred images that need to entered into this code i dont want to do it manually so i would like to generate the code using php but its not working. This code likely looks like gibberish to php users and is a bad example. i dont know i used a tutorial to set it up. Please let me know what im doing wrong. I purposely removed parts of the urls
<?php
function build_gallery_items($spnName,$spnImgSrc,$spnImgAlt,$splGallery,$splHidden,$splCaption,$splImgSrc,$splImgAlt,$splTitle)
{
$begin = "<div class=\"maincontainer\"><div class=\"itemcontainer\"><div class=\"itemcontents\">{simplepopup name=\"$spnName\" popup=\"false\"}<img src=\"$spnImgSrc\" alt=\"$spnImgAlt\">{/simplepopup}{simplepopup link=\"$splName\" gallery=\"$splGallery\" hidden=\"$splHidden\" Title=\"$splCaption\"}<img src=\"$splImgSrc\" alt=\"$splImgAlt\" width=160 height=120>$splTitle{/simplepopup}</div></div></div>"
};
?>
<?php build_gallery_items("FordThunderbird1","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0019.png","TB1","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0019.png","FordThunderbird","false","Insert Caption 1","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0019.png","TB1","FordThunderbird"); ?>
<?php build_gallery_items("FordThunderbird2","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0004.png","TB2","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0019.png","FordThunderbird","false","Insert Caption 2","http://www.mywebsite.com/main3/images/InstallationGallery/FordThunderbird/IMG_0004.png","TB2","FordThunderbird"); ?>