Add php syntax highlighting (#25514)
This commit is contained in:
@ -12,12 +12,12 @@ An array is defined by array(), or [].
|
|||||||
|
|
||||||
An example of an array in each style can be seen below:
|
An example of an array in each style can be seen below:
|
||||||
|
|
||||||
```
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$bikes = array('Suzuki','BMW','Yamaha');
|
$bikes = array('Suzuki','BMW','Yamaha');
|
||||||
```
|
```
|
||||||
```
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
$bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
||||||
@ -27,7 +27,7 @@ $bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
|||||||
|
|
||||||
Arrays can also be defined with named keys, as shown below:
|
Arrays can also be defined with named keys, as shown below:
|
||||||
|
|
||||||
```
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$bikes = [
|
$bikes = [
|
||||||
@ -43,7 +43,7 @@ Items within an array can be accessed by their corresponding key, or location wi
|
|||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
```
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
$bikes = ['Suzuki', 'BMW', 'Yamaha'];
|
||||||
@ -58,7 +58,7 @@ I like Suzuki
|
|||||||
```
|
```
|
||||||
|
|
||||||
Another example, using named keys can be seen below:
|
Another example, using named keys can be seen below:
|
||||||
```
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$bikes = [
|
$bikes = [
|
||||||
|
Reference in New Issue
Block a user