The following array is a print_r of an array called $result. I would like to know the best way to change the array to a set of variables that I can accesss any of these items as a variable for example if I want to see [queued_at] value I can just use a variable called $queued_at.
Array ( [response] => Array ( [success] => 1 [result] => Array ( [success] => Array ( [0] => Array ( [id] => 16623749 [device_id] => 22233 [message] => hi gg 2 [status] => pending [send_at] => 1463693469 [queued_at] => 0 [sent_at] => 0 [delivered_at] => 0 [expires_at] => 1463697069 [canceled_at] => 0 [failed_at] => 0 [received_at] => 0 [error] => [created_at] => 1463693469 [contact] => Array ( [id] => 3801452 [name] => Gg [number] => +64210419805 ) ) ) [fails] => Array ( ) ) ) [status] => 200 )
Here is a formatted version of array:
Array
(
[response] => Array
(
[success] => 1
[result] => Array
(
[success] => Array
(
[0] => Array
(
[id] => 16627521
[device_id] => 22269
[message] => test 10:37
[status] => pending
[send_at] => 1463700123
[queued_at] => 0
[sent_at] => 0
[delivered_at] => 0
[expires_at] => 1463703723
[canceled_at] => 0
[failed_at] => 0
[received_at] => 0
[error] =>
[created_at] => 1463700123
[contact] => Array
(
[id] => 3801855
[name] => +64212465478
[number] => +64212465478
)
)
)
[fails] => Array
(
)
)
)
[status] => 200
)