note 94124 modified in function.glob by danbrown

From: Date: Sun, 18 Oct 2009 16:14:41 +0000
Subject: note 94124 modified in function.glob by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161861@lists.php.net to get a copy of this message
here is a quick fix when nothing matches, glob will return false <?php $files=glob('*.txt')?glob('*.txt'):array(); ?> now you are able to use array function to $files. --was-- here is a quick fix when nothing matches, glob will return false $files=glob('*.txt')?glob('*.txt'):array(); now you are able to use array function to $files. http://php.net/manual/en/function.glob.php

« previous php.notes (#161861) next »