[ create a new paste ] login | about

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

PHP, pasted on Oct 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$input = "This
that
then
thar
these
them";

/*
should become:

This
    that
    then
    thar
    these
them
*/

echo preg_replace('/\n(.+?)\n/','\n\t$1\n',$input);
?>


Output:
1
2
3
4
5
6
This
\n\tthat
\nthen
\n\tthar
\nthese
them


Create a new paste based on this one


Comments: