1 2 3 4 5 6 7
<?php $s = 'anotherfoo:bar;seg98y34g.?sdebvw h segvu'; $result = array_shift(explode(':', $s)); echo $result; ?>
1
anotherfoo