Palle Gude - 2023-08-31 15:19:59 -
In reply to message 1 from Palle Gude
I asked Bard and it said, try this:
$array = [1, 2, 3, 4, 5];
// Old code
while (list($key, $value) = each($array)) {
echo "$key $value\n";
}
// New code
foreach ($array as $key => $value) {
echo "$key $value\n";
}
And now i get output like this:
Array
(
[datetime] => 2023-08-24 14:06:34
[from] => support@brooksdale.co.uk
[fromName] => Brooksdale
[replyTo] => support@brooksdale.co.uk
[replyToName] => Brooksdale
[subject] => Welcome to Brooksdale
[to] => user@email.uk
[full_header] => O:8:"stdClass":23:{s:4:"date";s:37:"Thu, 24 Aug )