[ create a new paste ] login | about

Link: http://codepad.org/HEUSmLkg    [ raw code | output | fork ]

PHP, pasted on Jul 16:
1
2
3
4
5
<?php
$str = "1_2_3_4_5";
$arrNumbers = explode("_", $str);

echo $arrNumbers[count($arrNumbers)-1]; //Should be 5.


Output:
1
5


Create a new paste based on this one


Comments: