[ create a new paste ] login | about

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

tchalvakspam - PHP, pasted on Nov 19:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

$str = '\data1\data2\data3\data_tmp\file.pgp';
$file = basename($str);

$last = array_pop(explode('\\', $str));

echo $file;
echo " \n";
echo $last;

?>


Output:
1
2
\data1\data2\data3\data_tmp\file.pgp 
file.pgp


Create a new paste based on this one


Comments: