I am currently using ftp\_rawlist to output every file and folder including subfolders in the root directory of a remote site. The output of the files in the array include the permissions, the user etc 

e.g from var\_Dump

```
string(68) "-rw-r--r--    1 XXXX   XXXX         1754 Sep 13 12:13 run.js"

```

I run through the array of files and folders in a foreach loop, I grab the last occurance of a space to isolate the file and folder name using strrchr function. I then trim the whitespace and finally using the if statement 

```
  <?php     
      if($newfilename != ".." || $newfilename != "."   $newfilename != "")  {

         echo $newfilename."</br>";
         var_dump($newfilename);
     }
     ?>

```

I expect it to output files and folders in the array that don't contain ".." or "." "" But it still outputs anyway. Any help please?

```
  array(".", "..", "name.txt")

```

just output 

name.txt

instead of 

., .., name.txt