Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$ar = ['a' => 2, 'b' => 4];
$el = reset($ar);
for ($i = 0; $i < count($ar); $i++) {
var_export($el);
$el = next($ar);
}