How to handle this array code with php?

1

I have a question about how to handle this array:

["*original"]=>


array(13) {
["id"]=>
int(1)
["user_id"]=>
int(3)
["reference"]=>
string(36) "c8d2076672c9631e8c048589f3a9a26f3961"
["status"]=>
string(8) "Pendente"
["paymentMethod"]=>
string(2) "ph"
["date"]=>
string(10) "2018-08-30"
["paymentLink"]=>
string(195) ""
["created_at"]=>
string(19) "2018-08-30 17:41:39"
["updated_at"]=>
string(19) "0000-00-00 00:00:00"
["pacote"]=>
int(1)
["tipo"]=>
string(20) "Ativação de pacote"
["valor"]=>
float(0)
["transaction_id"]=>
NULL

}

Price retrieve the array transaction_id, but the attribute ["* original"] does not leave, because of this asteristico.

Someone to solve with me?

    
asked by anonymous 06.10.2018 / 03:05

1 answer

0

Theoretically this would be:

$recuperado = $var["*original"]["transaction_id"];

var_dump($recuperado);

But as your array shows NULL:

["transaction_id"]=>
NULL

Then the value is null.

The asterisk does not get in the way of anything, see the test: link , probably the problem is in null value or something you did wrong syntax of your personal code

    
06.10.2018 / 06:29