3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $line = '"1212","$ 507.74","$ 0.00","$ 2,954.16","Kč 9,647.00","","TDR 697","","Kč 23,737.00","","","","","Kč 457.00","","","","","Kč 29,959.00","","","","","$ 104.00","","3232"'; //$line = trim($line, "\"\t\n\r"); $line = explode('","', $line); $line[0] = trim($line[0], "\"\t\n\r"); $line[count($line)-1] = rtrim($line[0], "\"\t\n\r"); print_r($line);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 1212 [1] => $ 507.74 [2] => $ 0.00 [3] => $ 2,954.16 [4] => Kč 9,647.00 [5] => [6] => TDR 697 [7] => [8] => Kč 23,737.00 [9] => [10] => [11] => [12] => [13] => Kč 457.00 [14] => [15] => [16] => [17] => [18] => Kč 29,959.00 [19] => [20] => [21] => [22] => [23] => $ 104.00 [24] => [25] => 1212 )