diff --git a/reference/spl/globiterator/construct.xml b/reference/spl/globiterator/construct.xml index b7f8ef43e7..c9dd72cc0e 100644 --- a/reference/spl/globiterator/construct.xml +++ b/reference/spl/globiterator/construct.xml @@ -54,18 +54,14 @@ count()) -{ +if (!$iterator->count()) { echo 'No matches'; -} -else -{ +} else { $n = 0; printf("Matched %d item(s)\r\n", $iterator->count()); - foreach($iterator as $item) - { + foreach ($iterator as $item) { printf("[%d] %s\r\n", ++$n, $iterator->key()); } }