Sunday, 28 June 2020

How to print subdirectories in PHP program?

Here is the php code to print the subdirectories

PHP CODE:

<?php

$dirs = array_filter(glob('*'), 'is_dir');
print_r( $dirs);

Output:

Array ( [0] => follow us [1] => htetcomp )

No comments:

Post a Comment