RE: [PHP] Storing Arrays in a database

2005-03-24 Thread Chris W. Parker
Joe Harman mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:15 PM said: I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? http://php.net/serialize and

Re: [PHP] Storing Arrays in a database

2005-03-24 Thread [EMAIL PROTECTED]
check serialize() and unserialize() in manual. implode() and explode() functions too. -afan Joe Harman wrote: Hey, I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? Thanks Joe -- PHP

Re: [PHP] Storing Arrays in a database

2005-03-24 Thread John Nichel
Joe Harman wrote: Hey, I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? Thanks Joe http://us4.php.net/serialize -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] --

RE: [PHP] Storing Arrays?

2004-02-24 Thread Jay Blanchard
[snip] If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? I thought of just putting the results of print_r($myarray); into the text field and using eval() to get at it later... is that the right way to go? [/snip]

Re: [PHP] Storing Arrays?

2004-02-24 Thread Nick Wilson
* and then Jay Blanchard declared [snip] If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? I thought of just putting the results of print_r($myarray); into the text field and using eval() to get at it

Re: [PHP] Storing Arrays?

2004-02-24 Thread Chris Hayes
At 11:10 24-2-04, you wrote: Hi all, If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? you could consider serialize() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Storing Arrays?

2004-02-24 Thread Jakes
depending how long you want to keep it, wrap the array in a object and then serialize the object in a session variable. Nick Wilson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * and then Jay Blanchard declared [snip] If I wanted to store an array for future use in a MySQL

Re: [PHP] Storing Arrays?

2004-02-24 Thread Jakes
rather just serialize() it. didnt read your question properly Jakes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] depending how long you want to keep it, wrap the array in a object and then serialize the object in a session variable. Nick Wilson [EMAIL PROTECTED] wrote in

RE: [PHP] storing arrays

2002-02-18 Thread Rick Emery
$outarray[2].\n; print $outarray[3].\n; print $outarray[4].\n; ? -Original Message- From: Clark [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 17, 2002 11:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] storing arrays I'm having trouble storing my array to a text file, utilizing serialize

Re: [PHP] storing arrays

2002-02-17 Thread Joffrey van Wageningen
- Original Message - From: Clark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 17, 2002 3:15 AM Subject: [PHP] storing arrays Two questions: 1) Is it possible to write an array to a file? not direct, use: $fp = fopen(/my/file, w); foreach($filearray as $row)

Re: [PHP] storing arrays

2002-02-17 Thread Matt
- Original Message - From: Clark [EMAIL PROTECTED] Sent: Saturday, February 16, 2002 9:15 PM Two questions: 1) Is it possible to write an array to a file? Yes, serialize it first with http://www.php.net/serialize. You can also place this in a db text field because it will be a

Re: [PHP] storing arrays

2002-02-17 Thread Clark
I'm having trouble storing my array to a text file, utilizing serialize() and unserialize(). Could you please show a very basic layout of the proper way to serialize and unserialize and store that to a file? Thanks. Matt [EMAIL PROTECTED] wrote in message