Welcome Guest, Not a member yet? Register   Sign In
Array to string conversion
#1

(This post was last modified: 07-09-2020, 10:59 AM by jreklund.)

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
Reply


Messages In This Thread
Array to string conversion - by andreaccident - 07-09-2020, 10:53 AM
RE: Array to string conversion - by jreklund - 07-09-2020, 11:01 AM
RE: Array to string conversion - by andreaccident - 07-09-2020, 11:09 AM
RE: Array to string conversion - by jreklund - 07-09-2020, 11:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB