Array to string conversion |
I am trying to print the values from my array:
print_r($google['Google_assigned_previous_day']); -> this works but prints: Array ( [0] => Array ( [sale] => 0.00 ) ). I want to be able to get the value only. The 0.00 foreach($google['Google_assigned_previous_day'] as $result['Google_assigned_previous_day']) { echo $result; } I try the code above but I get the error: Severity: Notice Message: Array to string conversion§ Filename: views/welcome_message.php Line Number: 66 Can someone help please? Thanks
Foreach works this way.
Code: foreach($google['Google_assigned_previous_day'] as $array) {
No idea, you said it where there when you dumped it.
Array ( [0] => Array ( [sale] => 0.00 ) )
(07-09-2020, 10:53 AM)andreaccident Wrote: Array ( [0] => Array ( [sale] => 0.00 ) ). I want to be able to get the value only. The 0.00 Right here mate.
Website: marcomonteiro.net | Blog: blog.marcomonteiro.net | Twitter: @marcogmonteiro | TILThings: tilthings.com
|
Welcome Guest, Not a member yet? Register Sign In |