-
-
Save tyshantprince/d46674f1804f5fd7bb34e283fd37b936 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$people = '{"data":[{"first_name":"jake","last_name":"bennett","age":31,"email":"jake@bennett.com","secret":"VXNlIHRoaXMgc2VjcmV0IHBocmFzZSBzb21ld2hlcmUgaW4geW91ciBjb2RlJ3MgY29tbWVudHM="},{"first_name":"jordon","last_name":"brill","age":85,"email": "jordon@brill.com","secret":"YWxidXF1ZXJxdWUuIHNub3JrZWwu"},]}'; | |
/** | |
* Instructions: | |
* | |
* Given the above JSON, build a simple PHP script to import it. | |
* | |
* Your script should create two variables: | |
* | |
* - a comma-separated list of email addresses | |
* - the original data, sorted by age descending, with a new field on each record | |
* called "name" which is the first and last name joined. | |
* | |
* Please deliver your code in either a GitHub Gist or some other sort of web-hosted code snippet platform. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment