need help with some php / sql

Hi i need help with a problem i am having,

below is my php page, i want my item to referenchae to data from my array i ve below. all i can get it to do is display the id from the database, i would show that id number as its name;
Thanks and sorry if i didnt explain my problem fully

[php]

<?php require 'item.php'; $mysql_db = "inv"; $mysql_user = "scott"; $mysql_pass = "******"; $con = mysql_connect("localhost", $mysql_user, $mysql_pass); mysql_select_db($mysql_db, $con); $result = mysql_query("SELECT * FROM invsql_inventories ORDER BY owner asc"); echo ""; while ($row = mysql_fetch_array($result)) { $item[] = $row['item']; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
Players item id slot
" . $row['owner'] . "" .$row['item'] . "" . $row['slot'] . "
"; mysql_close($con); ?>[/php]

[php]<?php

$item[] = array();

$item[0] = ‘AIR’;
$item[1] = ‘STONE’;
$item[2] = ‘GRASS’;
$item[3] = ‘SAND’;
$item[4] = ‘WIND’;
$item[5] = ‘METAL’;
[/php]

I don’t understand what you want, also show the structure of your database…

explain in detail

Sponsor our Newsletter | Privacy Policy | Terms of Service