On Unix, you can use preg_grep
to filter out filenames that start with a dot:
$files = preg_grep('/^([^.])/', scandir($imagepath));
Related Contents:
- scandir() to sort by date modified
- How to get only images using scandir in PHP?
- Can I bind an array to an IN() condition in a PDO query?
- PHP method chaining or fluent interface?
- How to secure database passwords in PHP?
- PDOException “could not find driver”
- How can I output a UTF-8 CSV in PHP that Excel will read properly?
- Use global variables in a class
- difference between two arrays
- PHP code to convert a MySQL query to CSV [closed]
- Best way to avoid duplicate entry into mysql database
- What does a \ (backslash) do in PHP (5.3+)?
- Upload Progress Bar in PHP
- Bulk Insertion in Laravel using eloquent ORM
- How to find entry by object property from an array of objects?
- Running MySQL *.sql files in PHP
- PHP preg_match to find multiple occurrences
- How to retract a salted password from the Database and auth user?
- “[notice] child pid XXXX exit signal Segmentation fault (11)” in apache error.log [closed]
- php pdo: get the columns name of a table
- mysqli_stmt::bind_param(): Number of elements in type definition string doesn’t match number of bind variables
- Calculating days of week given a week number
- PHP sessions timing out too quickly
- PHP how to get local IP of system
- Best way to automatically remove comments from PHP code
- How to extract a node attribute from XML using PHP’s DOM Parser
- CakePHP find method with JOIN
- How to sort a multidimensional array by a certain key?
- phpmyadmin – count(): Parameter must be an array or an object that implements Countable
- PHP function use variable from outside
- Can you append strings to variables in PHP? [duplicate]
- Laravel Mail::send() sending to multiple to or bcc addresses
- How to rename sub-array keys in PHP?
- “Warning: Cannot modify header information – headers already sent by” error [duplicate]
- PHP Mail, CC Field
- Do SQL connections opened with PDO in PHP have to be closed
- In PHP, is there a short way to compare a variable to multiple values?
- How add class=’active’ to html menu with php
- Get week number in month from date in PHP?
- converting a number base 10 to base 62 (a-zA-Z0-9)
- PHP daylight saving time detection
- implicit class variable declaration in php?
- WSDL to PHP with Basic Auth
- Format text in Excel file via PHP
- How do you set up use HttpOnly cookies in PHP
- Can I use string concatenation to define a class CONST in PHP?
- Crop or mask an image into a circle
- getting all values from h1 tags using php
- PHP date returning wrong Month on subtracting one month
- Using PHP to upload file and add the path to MySQL database