Skip to content

Instantly share code, notes, and snippets.

View allroundexperts's full-sized avatar
🏠
Remote warrior!

Sibtain Ali allroundexperts

🏠
Remote warrior!
View GitHub Profile
@allroundexperts
allroundexperts / challenge.php
Created December 4, 2018 15:30
Laravel PHP Developer Coding Challenge
<?php
require_once('./json.php'); //Importing the data file assuming it lies in the same directory as challenge.php file
$peopleArray = json_decode($people)->data;
//Making an array with all the emails and adding an extra property to $peopleArray
foreach($peopleArray as $key => $peopleObj){
$emails[] = $peopleObj->email;
$peopleObj->name = $peopleObj->first_name.' '.$peopleObj->last_name;