Hi,
I think you can use the eval() function to execute the stored info. The code
will look something like this
$res=mysql_query(...)
eval($row_from_query);

If you want to change the name of the array you could use
eval(str_replace("$array","$newarray",$row_from_query));

HTH
Dobromir Velev

-----Original Message-----
From: brendan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, September 13, 2001 2:20 PM
Subject: [PHP-DB] array in db field -> actual array


>hi,
>i am currently scouring the web for a solution to this but thought i
>would try here as well ..
>
>i have a text field in a mysql database
>the textfield contains an array written out as
>//--------------------
>$array[0][1]="one";
>$array[0][2]="two";
>$array[0][3]="thre";
>$array[1][1]="four";
>$array[2][1]="five";
>//--------------------
>
>now i need to extract this from the db .. simple
>and use it as an array for a function .. not as simple as i thought it
>would be
>
>
>ie
>
>$newarray =mysqlquery('etc','etc','etc')
>and $newarray should be
>$newarray[0][1]="one";
>$newarray[0][2]="two";
>$newarray[0][3]="thre";
>$newarray[1][1]="four";
>$newarray[2][1]="five";
>
>elp?
>
>cheers
>brendan
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to