codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $haystack="/this/is/the/haystack/string/to/be/trimmed/using/a/needle/string/"; $needle="to/be/"; $result = explode($needle, $haystack); $first_part = $result[0]; echo $first_part; ?>
Private
[
?
]
Run code
Submit