Ok thanks for answers, but im gonna loop the items out in a table like this:
<?php
$itemfile = file("txts/items.txt");
$rows = count($itemfile);
?>
<table>
<?php
$i = 0;
while($i < $rows) {
$item = explode("|", $itemfile[$i]);
$class = $item[0];
$name = $item[1];
$img = $item[2];
if($_POST['class'] == "displayall") {
echo("
<tr>
<td width=\"0%\"><img src=\"pictures/items/".$img.".gif\" border=\"1\"></td>
<td><font size=\"2\" face=\"Verdana, Arial, Helvetica, Sans-Serif\">".$name."</font></td>
</tr>
");
} else {
if($class == $_POST['class']) {
echo("
<tr>
<td width=\"0%\"><img src=\"pictures/items/".$img.".gif\" border=\"1\"></td>
<td><font size=\"2\" face=\"Verdana, Arial, Helvetica, Sans-Serif\">".$name."</font></td>
</tr>
");
}
}
$i++;
}
?>
</table>
i think i can sort them if i put the item names before the item classes.. but then its over 1500 rows to edit...