$f ) { $files[$i] = substr( $f, $fileRootLength ); } echo json_encode( $files ); ?>