https://github.com/julianamancera/appdev_lab-5_php
Applications Development & Emerging Technologies - PHP Lab Activity #5
https://github.com/julianamancera/appdev_lab-5_php
application-development emerging-technology php
Last synced: 3 months ago
JSON representation
Applications Development & Emerging Technologies - PHP Lab Activity #5
- Host: GitHub
- URL: https://github.com/julianamancera/appdev_lab-5_php
- Owner: JulianaMancera
- Created: 2025-02-24T03:02:39.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T03:17:32.000Z (3 months ago)
- Last Synced: 2025-02-24T04:23:34.905Z (3 months ago)
- Topics: application-development, emerging-technology, php
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AppDev_Lab-5_PHP
## Names Challenge
**Instructions**1. Take the array of names below and loop through them. The type of loop is up to you.
`$names = ['ALEC', 'BETH', 'CAROLINE', 'DAve', 'ElAnor', 'ANNa', 'Freddie', 'AdaM'];`2. Within the loop, use a conditional statement to check if the first letter of the name is `A`.
3. If the first letter is `A`, skip that name and continue to the next iteration.
4. If the first letter is not `A`, reverse the string.
5. Make all names lowercase before printing them.
### Hints
- You can use indexes to access the first character of a string. ($string[0]) or you can use the `substr()` function.
- You can reverse a string using the `strrev()` function.
- You can make a string lowercase using the `strtolower()` function.
- You can skip an iteration of a loop using the `continue` keyword.**The result should like this**
hteb
enilorac
evad
ronale
eidderf