FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Saving a three-dimensional array to the mysql database.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Saving a three-dimensional array to the mysql database. [message #178290] Tue, 29 May 2012 05:51 Go to next message
Kamela Ardina is currently offline  Kamela Ardina
Messages: 1
Registered: May 2012
Karma: 0
Junior Member
Hi!. How can I save a certain field from a three-dimensional array?
But that array comes from a xml code that I retrieve from channel
advisor API.

Need Help please.
Thank you;
Re: Saving a three-dimensional array to the mysql database. [message #178291 is a reply to message #178290] Tue, 29 May 2012 10:14 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 5/29/2012 7:51 AM, Kamela Ardina wrote:
> Hi!. How can I save a certain field from a three-dimensional array?
> But that array comes from a xml code that I retrieve from channel
> advisor API.
>
> Need Help please.
> Thank you;


If you can access the "field" (element would be a better word in my
opinion), you can save/store it in some variable.
Suppose you have some array (created from XML, or whatever):
$someArr = array();
$someArr[0] = array(22,55,99);
$someArr[1] = array("Joe","Will","Smith");
etc.

Now, if you need to store, say, the second element in $someArr[1],
simply do so:
.....yourcode.....
$rememberMe = $someArr[1][1]; // Will contain "Will"
.....yourcode.....

If that doesn't help you, post a more detailed description of your problem.

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: Saving a three-dimensional array to the mysql database. [message #178298 is a reply to message #178290] Wed, 30 May 2012 11:35 Go to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
On May 29, 6:51 am, Kamela Ardina <ardinakam...@gmail.com> wrote:
> Hi!. How can I save a certain field from a three-dimensional array?
> But that array comes from a xml code that I retrieve from channel
> advisor API.
>
> Need Help please.
> Thank you;

Your question is so vague and lacking of detail that all the following
are valid answers:

In the usual way.
By using an INSERT or UPDATE SQL statement,
Easily.

I think you need to show us what you have tried and explain precisely
what part of the process is causing you trouble.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to construct an associative and numeric indexable array
Next Topic: Problem setting Date field in MySQL
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 17:02:44 GMT 2024

Total time taken to generate the page: 0.03160 seconds