Re: Confused...need some programming logic

From: Date: Wed, 04 Aug 2004 23:10:30 +0000
Subject: Re: Confused...need some programming logic
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192774@lists.php.net to get a copy of this message
On Wed, 4 Aug 2004 15:40:03 -0700 (PDT), PHP Gen <genphp@yahoo.com> wrote: > > --- Justin Patrin <papercrane@gmail.com> wrote: > > > > 4: put 100 <img> tags to call 100 images per page > > > (confused here) > > > > I put some code inline below. Should work. If you > > want a thumbnail > > gallery, you could also create thumbnails using the > > GD functions in > > PHP, same them, and create an img tag with the > > thumbnail with a link > > to the fill file. > > > Hi, > Thanks for replying. > > I think you misunderstood my problem, your code is > just printing the images onto the screen...I need to > take 100 <img> tags and write it to each of the .html > pages... > > eg: > if there 112 images in the folder, > it should create 2 html files (index.htm and > index1.htm - this is already done - > THEN insert 100 img tags into the first file > (index.htm) and balance 12 img tags into the second > file) > > Ideas? > No, I didn't misunderstand, it was an oversight. Just change the echo to an fwrite. for($j = 0; $j < 100; ++$j) { if($pics[$i * 100 + $j]) { fwrite($handle, '<img src="'.$pics[$i * 100 + $j].'"/><br/>'); } } -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#192774) next »