I am stuck in writing a PHP function. What I need to do is pass on about 10 - 12 ID into an array and then sort them by name in mysql database and then print some statements. I got this far where I manually add an ID number and it prints the information I need but at this point I have to sort the data before using those ID numbers.
Here is what I have done so far.
<?php
function print_software_info($id) {
$appinfo = "SELECT * FROM `appinfo` WHERE `id` = ".intval($id);
$rt = mysql_query($appinfo) or die(mysql_error("Could not retrieve database information"));
echo $rt['name'];
echo $rt['image'];
}
?>
<?php
print_software_info(217);
print_software_info(179);
print_software_info(8);
?>