I need to get the last character of a string. Say I have \"testers\" as input string and I want the result to be \"s\". how can I do that in PHP?
Siemano, get only php files from selected directory:
$dir = '/home/zetdoa/ftp/domeny/MY_DOMAIN/projekty/project'; $files = scandir($dir, 1); foreach($files as $file){ $n = substr($file, -3); if($n == 'php'){ echo $file.''; } }