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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 129
    Comment on it

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

    So, basically The reset() function moves the internal pointer to the first element of the array.

    syntax of reset() function

    reset(array);
    

    array parameter is required.

    you can take reference of below example:

    <?php
    //here define a variable of array
    $Emp_name = array("Joe", "Roy", "Jorden", "Scott");
    //here call reset() function and print 
    echo reset($Emp_name);
    ?>
    

    The above example output will be:

    Joe
    

 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: