If what you want is to loop through the results for display, this code will do that:
while ($myrow = mysql_fetch_array($result)) {
$size = getimagesize($myrow['image']);
echo '<img src="' . $myrow['image'] . '" height="' . $size[1] . '" width="' . $size[0] . '" />';
}
If you really want the variable names with numbers (for later use?) you could do something like this:
$i = 0;
while ($myrow = mysql_fetch_array($result)) {
$img_size = getimagesize($myrow['image']);
${'size' . $i} = $img_size;
${'height' . $i} = $img_size[1];
${'width' . $i} = $img_size[0];
echo '<img src="' . $myrow['image'] . '" height="' . $img_size[1] .
'" width="' . $img_size[0] . '" />';
$i++;
}
although it would probably be better to use arrays:
while ($myrow = mysql_fetch_array($result)) {
$img_size = getimagesize($myrow['image'];
$size[] = $img_size;
$height[] = $img_size[1];
$width[] = $img_size[0];
echo '<img src="' . $myrow['image'] . '" height="' . $img_size[1] .
'" width="' . $img_size[0] . '" />';
}