-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
45 lines (39 loc) · 860 Bytes
/
example.php
File metadata and controls
45 lines (39 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
require_once('functions.php'); //include functions file, used below
//create 2 arrays which will be combined
$cities = [
'gilbert',
'winston-salem',
'north las vegas',
'norfolk',
'chesapeake',
'garland',
'irving',
'hialeah',
'fremont',
'boise',
'richmond',
'baton rouge',
'spokane',
];
$az_cities = [
'phoenix',
'chandler',
'mesa',
'tucson',
'glendale',
'scottsdale',
'gilbert',
'tempe',
'peoria',
'surprise',
'yuma',
'avondale',
'flagstaff',
];
//create phrase
$the_phrase = 'Distance between {1} and {2}';
//use functions to create phrases and convert to CSV file
$final = combine_arrays($az_cities, $cities, $the_phrase);
//optional - convert to csv. Other display options might be better for some people.
create_csv_from_array($final);