[PHP] Newbie lost in array

2003-07-22 Thread Tony Crockford
I've got brain fade today and am in need of a clue, please accept apologies if this is obvious. I have a data table: P_ref P_code P_Value I want to read the data out where P_ref='somevalue' and create variables for the content of P_Code with a value of P_Value what should I be looking for in

Re: [PHP] Newbie lost in array

2003-07-22 Thread Marek Kilimajer
$res=mysql_query(SELECT P_Code, P_Value FROM table WHERE P_ref='somevalue'); while(list($code, $value)=mysql_fetch_row($res)) { // now I'm not sure if you want $$code=$value; // or you want $array[$code]=$value; } Tony Crockford wrote: I've got brain fade today and am in need of a clue,