TIP: "Add item to an Array" as an operator

In nearly every tutorial (including the php manual) you add items to the end of an Array by writing this:

$array[] = $item;

Which is a tad odd, but I have just gotten used to it.

But today I stumbled across a peice of code where they fiddle a bit with the spaces to make that look like an operator!

$array []= $item;

Which looks great and makes a tad more sense. :slight_smile: