
Sam Kennedy
Novice
Aug 28, 2012, 6:39 AM
Post #1 of 4
(2483 views)
|
Multiple GD Objects
|
Can't Post
|
|
I'm working on some code which handles 10 images. To create an image object with GD you use:
$im1 = new GD::Image($width,$height,1); However, since I'm using 10 images, I don't want to write:
$im1 = ... $im2 = ... $im3 = ... So I used a for loop and:
${"im".$i} = new GD::Image($width,$height,1); Where $i would be the image number, however this doesn't work. What would be a better way of handling multiple GD objects? Thank You :) -Sam
|