if( $rand_num <= $chance )
{
//$item_id = mysql_query("SELECT `item` FROM `creatures` WHERE id = '$id_creature'");
$foo =& creature_stats( item, $id_creature );
$item_query = mysql_query("SELECT * FROM items WHERE id = '$foo'") or ('$item_query');
$item = mysql_fetch_array($item_query);
echo"You got an ".$item."!";
}
Creature Stats Function:
function &creature_stats($what_stat, $id)
{
$mysql_query=mysql_query("SELECT * FROM `creatures` WHERE `id` = '$id'");
$info=mysql_fetch_array($mysql_query);
return $info[$what_stat];
}
I need help getting it to echo $item
It justs puts out nothing.