zend framework - PHP For loop to generate dynamic images -
i have page need generate thumbnail images each article. number of thumbnails vary each want check article in database , create array of thumbnails i'm struggling logic.
this have far:
for ($i=1; $i<20; $i++) { $thumbimages = array( 'src' => $newblogdoc['tvs']['thumbnail-image-' . [$i]] ); }
is right direction? there more efficient way put array?
your question isn't clear if want make associative array of arrays need do:
for( $i=1; $i<20; $i++){ $thumbimages[] = array( 'src' => $newblogdoc['tvs']['thumbnail-image-'.[$i]] ); }
Comments
Post a Comment