PHP Add Array Items

Add Array Item

To add items to an existing array, you can use the bracket [] syntax.

Example

Add one more item to the fruits array:

$fruits = array("Apple", "Banana", "Cherry");
$fruits[] = "Orange";

Continue reading PHP Add Array Items