Closed (fixed)
Project:
Flexifield
Version:
6.x-1.0-alpha5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2009 at 04:48 UTC
Updated:
17 Nov 2009 at 05:22 UTC
Long story short, I need to access the some raw object data returned by flexifield. It looks like this:
[node_data_field_price_matrix_field_price_matrix_item_id] => Array
(
[0] => Array
(
[type] => price_matrix
[value] => a:2:{s:27:"field_price_matrix_quantity";a:1:{i:0;a:2:{s:5:"value";s:1:"6";s:14:"_error_element";s:67:"field_price_matrix][0][value][field_price_matrix_quantity][0][value";}}s:22:"field_price_matrix_ppu";a:1:{i:0;a:2:{s:5:"value";s:3:"605";s:14:"_error_element";s:62:"field_price_matrix][0][value][field_price_matrix_ppu][0][value";}}}
[item_id] => 405
)
[1] => Array
(
[type] => price_matrix
[value] => a:2:{s:27:"field_price_matrix_quantity";a:1:{i:0;a:2:{s:5:"value";s:2:"12";s:14:"_error_element";s:67:"field_price_matrix][1][value][field_price_matrix_quantity][0][value";}}s:22:"field_price_matrix_ppu";a:1:{i:0;a:2:{s:5:"value";s:3:"580";s:14:"_error_element";s:62:"field_price_matrix][1][value][field_price_matrix_ppu][0][value";}}}
[item_id] => 406
)
[2] => Array
(
[type] => price_matrix
[value] => a:2:{s:27:"field_price_matrix_quantity";a:1:{i:0;a:2:{s:5:"value";s:2:"24";s:14:"_error_element";s:67:"field_price_matrix][2][value][field_price_matrix_quantity][0][value";}}s:22:"field_price_matrix_ppu";a:1:{i:0;a:2:{s:5:"value";s:3:"540";s:14:"_error_element";s:62:"field_price_matrix][2][value][field_price_matrix_ppu][0][value";}}}
[item_id] => 407
)
)
How do I deserialize the value element?
Comments
Comment #1
mpaler commentedsorry for those long lines...
Comment #2
mpaler commenteduugh. sorry for the hasty post. It can be done as follows:
see php unserialize.