Using PHP to send photo URLs to JavaScript
<p>I am helping my friend with his photo website oneonethousand.org. He wants the photo gallery to be generated automatically from the photos he places in a directory. I am not experienced with Ajax and think it might be too complex to use for this.</p>

<p>What I think would be best is to use PHP to identify the URLs of the photos in a directory and somehow send those URLs to JavaScript so that JavaScript can pre-load them and then display them when the corresponding photo button is selected on the site.</p>

<p>I know PHP and JavaScript (JQuery) relatively well, but I'm just not quite sure what the Best Practice is for what I need to do.</p>

<p>Just to reiterate: What he wants to do is place the photos in the directory, PHP searches that directory for the photo names, and passes those URLs to JavaScript so it can pre-load them.</p>

<p>How do you recommend going about this? </p>
