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, hbkj,m,"; foreach(explode(",",$txt) AS $key => $subarray) { $array[$key] = explode("\n",$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~012 ) [3] => Array ( [0] => 345~678!!!901~234!!!567~890!!!1234~5678 ) [4] => Array ( [0] => [1] => hbkj ) [5] => Array ( [0] => m ) [6] => Array ( [0] => ) )