Requirements. Specifies the … PHP add to array is an operation in which we append elements to the existing array. Note that the list of elements is prepended as a whole, so that theprepended elements stay in the same order. There are basically three types of arrays in PHP: Indexed or Numeric Arrays: An array with a numeric index where values are stored linearly. Add ‘array’ after any item that will itself become an array. You can simply use the PHP foreach loop to create or populate HTML