Skip to content

Collection of Helpful Guides & Tutorials!

Collection of Helpful Guides & Tutorials!
Menu
  • Home
  • C#
    • Tutorials
    • C# Projects
    • Q & A
  • HTML5
  • CSS3
  • PHP
    • Tutorials
    • Q & A
  • SQL
  • JavaScript
    • Tutorials
    • Q & A
  • jQuery
    • Tutorials
    • Q & A
  • Bootstrap
  • Guides
  • Tools
December 20, 2015
HomePHP QuestionsHow to Get Array Length in PHP

How to Get Array Length in PHP

By Krishnaa PHP Questions  0 Comments

To get array length in PHP, we make use of Count function.  Sample code is given below.

<?php

$array = array("Robert", "Rony", "Peter", "Sam");

echo count($array);

?>

 

 
         

You May Also Like:

How to Add Key & Value in Array in PHP Arrays in PHP Associative Arrays in PHP How to Find Middle Element in Array in Javascript how to append one array to another array in javascriptHow to Append One Array to Another Array in Javascript

Recent Posts

  • Understanding Event Capturing and Event Bubbling: A Simple Explanation
  • Exploring the Difference Between let and var in JavaScript
  • Understanding Closures: A Beginner’s Guide
  • Understanding Dense and Sparse Arrays in JavaScript
  • Understanding the Difference Between Arrow Functions and Regular Functions in JavaScript

Useful Sites

  • Kody Tools
Privacy Policy
Collection of Helpful Guides & Tutorials! Copyright © 2025.
Back to Top ↑