1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
//Remplissage du tableau
<script type="text/javascript">
mesImages = new Array();
col=new Array;
<?
$a = 0;
$handle = opendir("../assets/images/VS2005/");
while (($file = readdir())!=false) {
clearstatcache();
if($file!=".." && $file!=".") {
$tab = getimagesize("../assets/images/VS2005/$file");
echo "col[0]='../assets/images/VS2005/$file'; col[1]=$tab[0]; col[2]=$tab[1];";
echo "mesImages[$a]=col;";
$a++;
}
}
closedir($handle);
//Lecture du tableau
for (i=0; i<5; i++) {
alert(mesImages[i][0]);
} |