I'm using this function to check the value of specific fileds per row in the
database.
such as....
$query = "SELECT * FROM $dbn WHERE status = 4";
$result = mysql_query($query) or die("failed to connect to DB");

while ($row = mysql_fetch_array ($result)) {
        print "row id = $row[id]";
        print "decription in row = $row[description]";
}

this works fine, it checks the DB for values with status = 4 and prints row
id and row description

My problem occurs when I want to creat variables based on these results.

I would ideally like to create dynamic variables based on row_id number e.g.

variable_row[id] = $row[description]

so later in the dynamically created page I could enter $variable_1 (1 being
the row[id] value) and the correct value would be selected. Is there anyway
of doing this? I tried using $$variable etc but no luck.

Any ideas appriciated.
Andrew


Reply via email to