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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 134
    Comment on it

    what is count() function

    The count() is utilize to count all data elements in an array, or in other word we can say The count() function returns the number of elements in an array.

    You can see below example of count() function. 
    
    
    
    
     <?php
    
         //here $ColorName is a variable in which store all data of array list
               $ColorName=array("Pink","Red","Blue","Green");
           //now use count function and pass the variable name in count()
           // so it will look like below
            echo count($ColorName);
        //here count($ColorName) will return the number, how much element in an array
    
     ?>
    
                Result = 4
    
        Result will come  4 because 4 element exist in the given array
    

 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: