3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "balıkesir:şanlıurfa:statyum-ankara kırıkkale:kocaeli:statyum-ankara van:mardin:statyum-ankara ağrı:trabzon:statyum-ankara elazığ:hatay:statyum-ankara"; $list = explode(PHP_EOL, $data); foreach($list as $l) { $items = explode(":", $l); if (count($items) > 0 ) { echo $items[2] . "#" . $items[0] . ":" . $items[1] . "\n"; } } ?>

preferences:
24.94 ms | 404 KiB | 5 Q