Browse - Programming Tips - How do you append a element to the end of a PHP array?

Date: 2009nov26
Language: php


Q.  How do you append a element to the end of a PHP array?

A.  Assign to [] like this:

$a = array(); $a[] = 1; $a[] = 2; $a[] = 3;