hi there i got a php code from some tutorial but i can't understand the use of [] in front of the variables, can someone explain this code please.

```
$text= "KKE68TSA76 Confirmed on 30/03/17 at 2:12PM Ksh100.00 received from 254786740098";
        }
        $mpesa =explode(" ", $text);
        $receipt=$mpesa[0]; // Code    
        $pesa=$mpesa[5]; //
        $p = explode("h", $pesa);
        $decimal=$p[1]; // Amount with decimal
        $dc = explode(".", $decimal);
        $koma=$dc[0]; // Payment
        $ondoa = explode(",", $koma);
        $kwanza=$ondoa[0]; // Payment
        $pili=$ondoa[1]; // Payment
        $payment=$kwanza.$pili;
        $phone=$mpesa[8]; // Phone

```
['https://Stackoverflow.com/questions/43876071', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7778161/']
The [ ] is an array position. Exploding $mpesa turns that string of text into an array split by every space. $mpesa[0] is array position one, containing KKE68TSA76, $mpesa[1] contains Confirmed.. etc
The [ ] us an array positioner, so it indicates the position of an element in the list/array. 

But what are arrays? 

> 
> An array is a special variable, which can hold more than one value at
>  a time. - [W3Schools](https://www.w3schools.com/php/php_arrays.asp)
> 
> 
> 

```
$array = array(
  "Item 1", // Position 0
  "Item 2", // Position 1
  "Item 3" // Position 2
);

echo $array[0]; // THIS WILL OUTPUT: "Item 1".
echo $array[1]; // THIS WILL OUTPUT: "Item 2".
echo $array[2]; // THIS WILL OUTPUT: "Item 3".

```

I hope this can be useful.