3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $txt = "nmzdmfn,456,789~012,345~678!!!901~234!!!567~890!!!1234~5678"; foreach(explode(",",$txt) AS $key => $subarray) { $array[$key] = explode("~",$subarray); } print_r($array);
Output for 4.3.0 - 7.1.0
Array ( [0] => Array ( [0] => nmzdmfn ) [1] => Array ( [0] => 456 ) [2] => Array ( [0] => 789 [1] => 012 ) [3] => Array ( [0] => 345 [1] => 678!!!901 [2] => 234!!!567 [3] => 890!!!1234 [4] => 5678 ) )