Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use glob() function in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 196
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to use glob() function in php ?

    Basically the glob() function is used for returning an array of filenames or directories matching a specified pattern.
    The glob() function returns "TRUE" on success and "FALSE" on failure.

    Syntax of glob() function

     glob(pattern,flags)
    

    you can see below example:

    <?php
    //here call glob() and print result
    print_r(glob("*.php"));
    ?>
    

    The output of the code above will be:

    Array ( [0] => index.php [1] => test1.php ) 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: