3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* data (var_export) array ( 'id' => '183970', 'player1' => 'Weird', 'player2' => 'Bloodbuddy', 'player1_items' => '644:204,10:200000,', 'player2_items' => '38:200,', )array ( 'id' => '183969', 'player1' => 'Frog', 'player2' => 'Eh', 'player1_items' => '656:1,11:3797,33:1111,42:200,40:100,31:1111,1263:1,522:1,', 'player2_items' => '405:1,', ) */ $item = ['id' => '183970', 'player1' => 'Weird', 'player2' => 'Bloodbuddy', 'player1_items' => '644:204,10:200000,', 'player2_items' => '38:200,', ]; $player1_items = explode(':', $item['player1_items']); foreach ($player1_items as $key => $value) { echo $value . PHP_EOL; }
based on TuaAm
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.28 - 7.3.0beta1
644 204,10 200000,