<?php 
echo '<table class="table table-hover">
<tr class="table-success"><td colspan=2><b><center>Basic Information</center></b></td></tr>
<tr><td>Name:</td><td>'.ucwords(str_replace('_',' ',$item['sortname'])).'</td></tr>
<tr><td>Item ID:</td><td>'.$item['itemid'].'</td></tr>
<tr><td>Stack Size:</td><td>'.$item['stackSize'].'</td></tr>
<tr><td>Sell Price:</td><td>'.$sellprice.' Gil</td></tr>
<tr><td>Sellable:</td><td>'.$sell.'</td></tr>
<tr><td>Flags:</td><td>';
 $x=$item['flags'];
   $n = 1 ;
    while ( $x > 0 ) {
        if ( $x & 1 == 1 ) {
            echo ' '.$flag_array[$n].', ';
        }
        $n *= 2 ;
        $x >>= 1 ;
    }
if ($x==0){
	echo 'None';
}
echo '
</td></tr>
<tr><td>AH Category:</td><td>'.$ahcat[$aH].'</td></tr>';
if($item['aH'] > 0)
{
echo '<tr><td>AH Stock:</td><td>';
    if ($item['stackSize'] > 1)
    {
        $stack = getAHCountStack($itemid);
        echo ''.$stack. ' stacks / ';
    }
$single = getAHCountSingle($itemid);    
echo ''.$single. ' singles</td></tr>';
} 
echo '</table>';