Skip to content

Commit

Permalink
Improve example in the 'arrays' concept and connected exercise (#572)
Browse files Browse the repository at this point in the history
* Update introduction.md

* Update about.md

* Update introduction.md
  • Loading branch information
aan-t authored Oct 31, 2023
1 parent fc64d0a commit 7011e9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions concepts/arrays/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ Access, assign, append values using the index operator:
```php
$prime_numbers = [1, 3, 5, 7, 11, 12];

$prime_numbers[5] = 13;

$unlucky_number = $arr[3]; // replace 12 with 13
$prime_numbers[5] = 13; // replace 12 with 13

$prime_numbers[] = 17; // array now contains [1, 3, 5, 7, 11, 13, 17]
```
Expand Down
4 changes: 1 addition & 3 deletions concepts/arrays/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ Access, assign, append values using the index operator:
```php
$prime_numbers = [1, 3, 5, 7, 11, 12];

$prime_numbers[5] = 13;

$unlucky_number = $arr[3]; // replace 12 with 13
$prime_numbers[5] = 13; // replace 12 with 13

$prime_numbers[] = 17; // array now contains [1, 3, 5, 7, 11, 13, 17]
```
Expand Down
4 changes: 1 addition & 3 deletions exercises/concept/language-list/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ Access, assign, append values using the index operator:
```php
$prime_numbers = [1, 3, 5, 7, 11, 12];

$prime_numbers[5] = 13;

$unlucky_number = $arr[3]; // replace 12 with 13
$prime_numbers[5] = 13; // replace 12 with 13

$prime_numbers[] = 17; // array now contains [1, 3, 5, 7, 11, 13, 17]
```
Expand Down

0 comments on commit 7011e9c

Please sign in to comment.