boofulls
asked on
last 3 chars
how do i assign a new variable to be the last three characters of a variable
ie if $old is "hello.txt"
then $new becomes "txt"
thanks
ie if $old is "hello.txt"
then $new becomes "txt"
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$new=substr($old,-3); #unless what you really want are all characters after the last '.'
ASKER