Warning: Your browser is very out-of-date. You should upgrade to a better browser.

glob($string);

Return an array of pathnames matching a specific pattern.

// Find all CSV files in the /home/var/imports/ directory 
glob("/home/var/imports/hello-*.csv");
  • /home/var/imports/hello-world.csv – Returned
  • /home/var/imports/hell-world.csv – Not returned
  • /home/var/imports/hello-.csv – Returned.

Hello, I'm Keith, a website developer in Belfast, Northern Ireland working with PHP, Magento, Shopify and WordPress.

I've been building websites for over 10 years, from custom website development to bespoke web applications, Shopify and Magento ecommerce and Online Leaning Environments. I've worked on a range of projects and am always looking out for the next interesting project.

Related PHP Posts

PHP August 2021

Google Sheets to PHP Array

This PHP function accepts a public Google Sheets URL and converts it into a PHP array. You can use the array to either display the...
PHP March 2021

PHP cURL Requests with JSON or XML

The following post will explain how to use PHP/cURL to retrieve data in JSON or XML and process it for using in your PHP application...
PHP February 2021

Global Payments: Strong Customer Authentication (SCA) and 3D Secure 2

The roll out of 3D Secure 2 has been a long drawn-out process not helped by the COVID–19 pandemic. Part of the update has included...

More PHP Posts...