serialize
--
/James
On Fri, May 9, 2008 at 10:40 AM, Shelley [EMAIL PROTECTED] wrote:
Hi all,
If I have an array like this:
$arr = array (
'c' = 'd',
'e' = 'f');
How can I convert this array into a string? I want to write an array into a
file.
Thanks in
What is the format you want it to be
You can use JSON_encode(array());
To get into a text like representation
Chetan Dattaram Rane
Software Engineer
-Original Message-
From: Shelley [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 3:11 PM
To: PHP General list
Subject: [PHP]
Yet another option is use serialize(array())
Chetan Dattaram Rane
Software Engineer
-Original Message-
From: Shelley [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 3:11 PM
To: PHP General list
Subject: [PHP] Get array as string --Help
Hi all,
If I have an array like this:
Yet another option is use serialize(array())
or you could use var_export if you need php code
http://php.net/var_export
greets,
Zoltán Németh
Chetan Dattaram Rane
Software Engineer
-Original Message-
From: Shelley [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 3:11 PM
, 9 de maio de 2008 08:37
Para: Chetan Rane
Cc: 'Shelley'; 'PHP General list'
Assunto: RE: [PHP] Get array as string --Help
Yet another option is use serialize(array())
or you could use var_export if you need php code
http://php.net/var_export
greets,
Zoltán Németh
Chetan Dattaram Rane
5 matches
Mail list logo