Another example added (#27998)
* Another example added Multiple datatypes added in Syntax section. * Update index.mdpull/29885/head^2
parent
8217c89617
commit
9e1be6b7eb
|
@ -23,6 +23,15 @@ $bikes = array('Suzuki','BMW','Yamaha');
|
|||
$bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
||||
```
|
||||
|
||||
PHP arrays can store more than one type of value at a time:
|
||||
```
|
||||
<?php
|
||||
|
||||
$arr = array('Suzuki', 3.1415, false, -273);
|
||||
```
|
||||
As you can see there is a string, a float number, a boolean valuea and an integer number.
|
||||
|
||||
|
||||
## Key => Value
|
||||
|
||||
Arrays can also be defined with named keys, as shown below:
|
||||
|
|
Loading…
Reference in New Issue