[ create a new paste ] login | about

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

PHP, pasted on Jan 30:
1
2
3
4
5
<?php 
 $string = "aaa, bbb, ccc, ddd, eee, fff";
 $output = implode(array_slice(explode(",",$string), 0, 3),",");
 print_r($output);
?>


Output:
1
aaa, bbb, ccc


Create a new paste based on this one


Comments: