lundi 13 avril 2015

What does this code do in php?


Vote count:

0




I got this little piece of code from an old USB i found, just want to see what you guys think x]



function loadCatalog($mysqlQuery) {

$imgPath = 'img/catalog/';
$handle = opendir($imgPath);

$currentValue = 1;

while ($row = mysql_fetch_assoc($mysqlQuery)){
if(false !== ($entry = readdir($handle))){
$productConcept = $row['Concept'];
$productPrice = $row['UnitPrice'];

if ($entry != "." && $entry != "..") {
$imgPath .= $entry;

$this->loadCatalogElements($currentValue, $imgPath, $productConcept, $productPrice);
$imgPath = 'img/catalog/';
$currentValue++;
}
}
}
closedir($handle);

return true;


}



asked 9 secs ago







What does this code do in php?

Aucun commentaire:

Enregistrer un commentaire