tags:

views:

35

answers:

2

hey guys,

if (strlen($filename) > 70) {
            //trim the string to 70 chars 
            //delete chars from the beginning!
        }

what method do i use.

regards matt

+3  A: 
$filename = substr($filename, -70);
konforce
+1  A: 

to get the last chars from a string:

substr($string, -70);

first 70 chars:

substr($string, 0, 70);

but, of course, you could check php docs for more info.

Rodrigo