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
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
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]
--
[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]
* 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
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:
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
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
$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
- 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)
- 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
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
12 matches
Mail list logo