[thelist] PHP arrays

Andrew Maynes andrew at humanbehaviour.co.uk
Wed Jan 22 17:06:01 CST 2003


I hope this come sput right... I have:

$result=mysql("$DBName","SELECT * FROM Items WHERE ItemID='$II'");
fontFace("Arial","Select an item:<br><br>");
echo "<ul>";
while ($row  =  mysql_fetch_row($result)) {
$IS=$row[0];
$IN=$row[1];
$ID=$row[2];
$IC=$row[3];
$Ca=$row[4];
$SC=$row[5];
$II=$row[6];
}

and I want to present $Ca=$row[4]; as the page title but I dont want the number
1 appearing!  The $Ca=$row[4]; is also Category in another table (Category) but
$Ca=$row[4]; s displaying the number not the description for the chosen
$Ca=$row[4];

Presumably I will have to write an array?  Is there anything I should watch out
for that may cause problems with this?  As I am also going to (hopefully)
writing a for loop to pull all the records for the chosen category and not just
one as this query is doing?

Andrew




More information about the thelist mailing list