June 17th in Tutorials ∇, Web Coding .

FIND THE NUMBER OF ROWS IN PHP ARRAY

  • Delicious
  • Design Bump
  • Facebook
  • Digg
  • Reddit
  • Google
  • LinkedIn
  • Technorati
  • StumbleUpon
  • Twitter
  • RSS Feed

While working in any programming language, you must know the number of rows you have in the array that is to be processed. It is good that PHP programming language has a built-in function that helps you to count the number of elements in any array. For example you have an array that goes like: $myarray = array(1,2,3);

You set a variable in order to store the resulting number of rows in the array and initialize the variable to 0, like this: $numofRows= 0;

Now by using the function ‘count’ you can determine the number of rows in your array.

$numofRows = count($myarray);

Comments

  • Lory Swartwout
    September 28, 2010
  • Charleen Mitsakos
    February 21, 2011

Leave A Comment.





Trackbacks

Ulancer Blog One Source To Your Freelancing Needs

About Us

Ulancer is a Freelance Network and Resource website that offers inspirational art, time-saving techniques, insightful tutorial, useful resources such as freelancer bookmarking and website submitting. Our Freelance Blog covers web development, advertising, freelance resources, mobile applications, web & graphic designing.

Need help with your subscriptions, job advert or the site? Visit our Support Center, You will probably find the answer to your question there.