Re: [PHP] a little trickery

2012-09-09 Thread David McGlone
On Sunday, September 09, 2012 03:02:17 PM Stuart Dallas wrote: > On 9 Sep 2012, at 04:19, David McGlone wrote: > > On Saturday, September 08, 2012 03:49:27 PM you wrote: > >> On 8 Sep 2012, at 15:35, David McGlone wrote: > >>> I have a function that reads a directory and gets all the file names o

Re: [PHP] a little trickery

2012-09-09 Thread Stuart Dallas
On 9 Sep 2012, at 04:19, David McGlone wrote: > On Saturday, September 08, 2012 03:49:27 PM you wrote: >> On 8 Sep 2012, at 15:35, David McGlone wrote: >>> I have a function that reads a directory and gets all the file names of >>> images, and I am wondering if it's possible to concatinate this

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 11:19:29 PM David McGlone wrote: > On Saturday, September 08, 2012 03:49:27 PM you wrote: > > > > > function completeImageFilename($prefix) > > { > > > > $matches = glob('images/property_pics/'.$prefix.'*'); > > return $matches[0]; > > > > } > >

Re: [PHP] a little trickery

2012-09-08 Thread David McGlone
On Saturday, September 08, 2012 03:49:27 PM you wrote: > On 8 Sep 2012, at 15:35, David McGlone wrote: > > I have a function that reads a directory and gets all the file names of > > images, and I am wondering if it's possible to concatinate this function > > withint an image tag. Here's an exampl

Re: [PHP] a little trickery

2012-09-08 Thread Daniel Brown
On Sat, Sep 8, 2012 at 10:49 AM, Stuart Dallas wrote: > > Is there just one image in the folder that starts with the 9 digit number? In > that case it's dead simple (untested code): > >function completeImageFilename($prefix) > { > $matches = glob('images/property_pics/'.$prefix.'*'); >

Re: [PHP] a little trickery

2012-09-08 Thread Stuart Dallas
On 8 Sep 2012, at 15:35, David McGlone wrote: > I have a function that reads a directory and gets all the file names of > images, > and I am wondering if it's possible to concatinate this function withint an > image tag. Here's an example I tried. > > function pictures() { > >$dir = 'ima

[PHP] a little trickery

2012-09-08 Thread David McGlone
I have a function that reads a directory and gets all the file names of images, and I am wondering if it's possible to concatinate this function withint an image tag. Here's an example I tried. function pictures() { $dir = 'images/property_pics/'; $file = array(); if(is_dir($dir))