<?php class IterableClass implements ArrayAccess { private array $data = []; public function offsetExists(mixed $offset): bool { return true; } public function offsetGet(mixed $offset): mixed { return $this->data[$offset]; } public function offsetSet(mixed $offset, mixed $value): void { } public function offsetUnset(mixed $offset): void { } } $seasonsData = [new IterableClass(), new IterableClass()]; foreach ($seasonsData as $s) { echo isset($s['priceweek']) ? $s['priceweek'] : ''; }
You have javascript disabled. You will not be able to edit any code.