Jump to content

[SOLVED] Help With Array


tbone05420

Recommended Posts

Hi All,

 

I am working with an array from a DB which is serialized.

 

I am able to unserialize it and load the array into a variable.

 

Now once I have it there, I am having trouble reading a certain value from the array.

 

I would also like to place another entry into the array, serialize it and place it back into the DB.

 

Here are the values in the array...

Array ( [1] => Array ( [shipping] => Custom shipping method [rates] => Array ( [0] => 25.45 ) [tracking_number] => 123456789[carrier] => FDX ) )

 

A) For example, how would I load the tracking number(123456789) into a variable $trackit

 

B) How would I insert a different tracking number back in. say 987654321, so I can in turn reserialize the array and update the DB.

 

I am not asking about the serializing or writing to the DB, just the array stuff.

 

Thanks,

TBone

 

Link to comment
https://forums.phpfreaks.com/topic/105089-solved-help-with-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.