PHP Classes

database array

Recommend this page to a friend!

      PHP Flash SlideShow  >  All threads  >  database array  >  (Un) Subscribe thread alerts  
Subject:database array
Summary:how to add an image array
Messages:2
Author:Kiran Venkatesh
Date:2007-10-05 19:44:29
Update:2009-02-27 03:57:52
 

  1. database array   Reply   Report abuse  
Picture of Kiran Venkatesh Kiran Venkatesh - 2007-10-05 19:44:29
Hi

i have been trying to add an image array from a database to the slideshow class, but have been constantly frustrated. I am able to retreive the images and print them using an echo, with no problems. but i am just not able to create the slide show. i have written my script in php.

foreach ($output as $photo) {
$big=$photo['src_big'];//ECHO FOR THIS PRINTS IMAGES
$small=$photo['src_small'];

$movie = new flashSlideShow(300, 225, 3, '#FFFFFF');

$myfile = array();
$movie->addImages($photo['src_small']);

$movie->output();
}

i do not know how to proceed. any help is very much appreciated.
Thank you

  2. Re: database array   Reply   Report abuse  
Picture of Esperi Media Esperi Media - 2009-02-27 03:57:52 - In reply to message 1 from Kiran Venkatesh
<?php

include('class.flashslideshow.php');

$movie = new flashSlideShow(300, 225, 3, '#FFFFFF');

// database array...

$sql = mysql_query("SELECT * FROM images");
while($q = mysql_fetch_array($sql)){ // array start..

$pic = $q["name"];
if($pic ==""){
$pic2 ="images/noimagebig.jpg";

}else{

$pic2 ="images/".$pic."_normal.jpg";

}

$movie->addImage($pic2);
} // array final...

$movie->output();