-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (26 loc) · 867 Bytes
/
Copy pathindex.php
File metadata and controls
31 lines (26 loc) · 867 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
<?php
include 'init.php';
echo 'Generating to <strong>'. __dir__. '\\raw\\quotes.json</strong><br><br>';
// Generate text file
if(true === ($textFile = Make::textFile($collection))) {
echo 'Generated TEXT file.<br>';
} else {
echo '~ Failed to create TEXT file. '. $textFile. '<br>';
}
// Generate JSON file
if(true === ($jsonFile = Make::jsonFile($collection))) {
echo 'Generated JSON file.<br>';
} else {
echo '~ Failed to create JSON file. '. $jsonFile. '<br>';
}
/**
* Generate as various arrays
* JavaScript
* PHP
*/
if(true === ($variousArrays = Make::variousArrays($collection))) {
echo 'Generated as various arrays.<br>';
} else {
echo '~ Failed to create various arrays. '. $variousArrays. '<br>';
}
echo '<br/>Generated a total of <strong>', count($collection), ' quotes<strong> from <strong>', count($authors), ' authors</strong><br>';