<?php $s = '~1~~2~~3~'; $a = preg_split('/~+/', $s, -1, PREG_SPLIT_NO_EMPTY); print_r($a);
Standard input is empty
Array ( [0] => 1 [1] => 2 [2] => 3 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!