The method of obtaining the number of array php

  • $arr = Array('0','1','2','3','4');
  • echo count ($ arr); // php novice, this personally tested
  • // output 5
  • $arr = array('A','B','C');
  • echo sizeof($arr);
  • // output 3

 

Guess you like

Origin www.cnblogs.com/xinyunyou/p/12640380.html