Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Add item to end of array

$
0
0
how reliable is adding items to the end of an array with this code
$array= array();

$array[] = 'index one';

$array[] = "index two";




i have always used code like this before

$array= array();

$array[count($array)] = 'index one';

$array[count($array)] = "index two";




is one more accurate?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>