I am using the Opencart framework and I have configured the Opencart mobile API. The thing is, I get an array like this
Array (
[0] => Array (
[product_option_id] => 228
[product_option_value_id] => 20
[option_id] => 13
[option_value_id] => 49
[price] => 280.0000
[value] => 1000.00000000
[name] => please select weight
[type] => select
)
)
Array (
[0] => Array (
[product_option_id] => 228
[product_option_value_id] => 20
[option_id] => 13
[option_value_id] => 49
[price] => 280.0000
[value] => 1000.00000000
[name] => please select weight
[type] => select
)
[1] => Array (
[product_option_id] => 228
[product_option_value_id] => 21
[option_id] => 13
[option_value_id] => 50
[price] => 140.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
)
Array (
[0] => Array (
[product_option_id] => 228
[product_option_value_id] => 20
[option_id] => 13
[option_value_id] => 49
[price] => 280.0000
[value] => 1000.00000000
[name] => please select weight
[type] => select
)
[1] => Array (
[product_option_id] => 228
[product_option_value_id] => 21
[option_id] => 13
[option_value_id] => 50
[price] => 140.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
)
Array (
[0] => Array (
[product_option_id] => 228
[product_option_value_id] => 20
[option_id] => 13
[option_value_id] => 49
[price] => 280.0000
[value] => 1000.00000000
[name] => please select weight
[type] => select
)
[1] => Array (
[product_option_id] => 228
[product_option_value_id] => 21
[option_id] => 13
[option_value_id] => 50
[price] => 140.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
[2] => Array (
[product_option_id] => 232
[product_option_value_id] => 32
[option_id] => 13
[option_value_id] => 50
[price] => 25.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
So, I want to get the last or final value of an array,
in this list of arrays this should be my last array
Array (
[0] => Array (
[product_option_id] => 228
[product_option_value_id] => 20
[option_id] => 13
[option_value_id] => 49
[price] => 280.0000
[value] => 1000.00000000
[name] => please select weight
[type] => select
)
[1] => Array (
[product_option_id] => 228
[product_option_value_id] => 21
[option_id] => 13
[option_value_id] => 50
[price] => 140.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
[2] => Array (
[product_option_id] => 232
[product_option_value_id] => 32
[option_id] => 13
[option_value_id] => 50
[price] => 25.0000
[value] => 500.00000000
[name] => please select weight
[type] => select
)
)
Someone help me solve this problem.
source
share