3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array ( 53 => array('num' => 20,'name' => 'aaa'), 10 => array('num' => 20,'name' => 'bbb') ); $resultStrings = array(); foreach ($array as $key => $values) { $subarrayString = "('$key','" . implode($values, "','") . "')"; $resultStrings[] = $subarrayString; } $result = implode($resultStrings, ","); ?>
based on lY6Wf
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0