Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • array

PHP - Array length

Compute/get length of a given array.

0
613
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Using sizeof

sizeof({{array}})
php

Notes

  • Same as count approach

last update: Nov. 28, 2014

0
613
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

Using count

count({{array}})
php

Notes

  • Same as sizeof approach

last update: Nov. 28, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • Sort list of numbers
  • Append item to array
  • Concatenate two arrays
  • Get last element of array
  • Get random item from array

Other language

  • Scala
  • Python
  • JavaScript

Random task

  • For each loop
  • Create empty array
  • Switch
  • Django redirect directly in urls.py
  • Range of alphabet chacters
  • Blog
  • About
  • License