-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp
17 lines (15 loc) · 900 Bytes
/
php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
$people = '{"data":[{"first_name":"cassie","last_name":"zieme","age":32,"email":"marks.giuseppe@mcglynn.com","secret":"VXNlIHRoaXMgc2VjcmV0IHBocmFzZSBzb21ld2hlcmUgaW4geW91ciBjb2RlJ3MgY29tbWVudHM="},{"first_name":"merritt","last_name":"paucek","age":37,"email":"pvandervort@mante.or","secret":"YWxidXF1ZXJxdWUuIHNub3JrZWwu"},{"first_name":"linda","last_name":"waelchi","age":29,"email":"sheridan36@example.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 web-hosted code snippet platform.
*/