https://github.com/julianamancera/appdev_lab-2_php
Applications Development & Emerging Technologies - PHP Lab Activity #2
https://github.com/julianamancera/appdev_lab-2_php
application-development emerging-technology php
Last synced: 3 months ago
JSON representation
Applications Development & Emerging Technologies - PHP Lab Activity #2
- Host: GitHub
- URL: https://github.com/julianamancera/appdev_lab-2_php
- Owner: JulianaMancera
- Created: 2025-02-14T04:38:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-14T06:55:53.000Z (3 months ago)
- Last Synced: 2025-02-14T07:32:16.729Z (3 months ago)
- Topics: application-development, emerging-technology, php
- Language: PHP
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AppDev_Lab-2_PHP
### Challenge 1: Sum of an Array
1. Create an array of numbers: 1,2,3,4,5
2. Get the sum of all of the numbers combined and put into a variable. `$sum`
3. Count the number of elements in the array and put into a variable. `$quantity`
4. Print out 'The sum of the `{quantity}` numbers is: `{sum}` '. For example, if the array is [1, 2, 3, 4, 5], the output should be:
`'The sum of the 5 numbers is: 15'.`### Challenge 2: Colors array
1. Sort the `$colors` array in ascending order.
2. Add `'purple'` and `'orange'` to the end of the array.
3. Add `'Red Apple'` to the beginning of the array
4. Replace the `green` color of the array to `Green mango`.**You should end up with the output of the following array:**
`Array ( [0] => Red Apple [1] => blue [2] => Green mango [3] => red [4] => yellow [5] => purple [6] => orange )`### Challenge 3: Job Listings Array
1 PHP Developer IBM [email protected] 09168457456 PHP,MySQL, Javascript
2 Web Designer AWS [email protected] 09175597456 PhotoShop,Illustrator, CSS
3 Network Admin CISCO [email protected] 09202224575 Database, CyberSecurity, Networking
1. Create a multi-dimensional array of associative arrays of 3 job listings shown above.
Also add an array field for skills. The skills array should be an array of strings with each skill a person has example
`'skills' => ['PHP', 'MySQL', 'JavaScript']`
**NOTE:** note for the name of array varible use this `$listings[]`;
2. Create a new record using the `array_push()` function. The new record should have the same fields as the others.
`4 | Graphic Artist | ADOBE | [email protected] | 09208456544 | Photoshop, Bootstrap, Flutter `
3. Print out the `job_title`, `company` and `email` of the **second job listing** from the array.
4. Print out the *first* and *third skill* of the **third job listing** in the array.