-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
58 lines (51 loc) · 1.3 KB
/
index.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
<?
// sortBibleSearch
//
// Take a string an output a useful array for searching the bible.
//
// Include the sortBibleSearch.php file to begin.
include("sortBibleSearch.php");
// Examples:
$results = sortBibleSearch("Matthew 1:1");
// array (
// 'BookNumber' => false,
// 'Book' => 'Matthew',
// 'Chapter' => '1',
// 'StartVerse' => '1',
// 'EndVerse' => false,
// 'QueryType' => 1,
// )
$results = sortBibleSearch("1 John 4:17");
// array (
// 'BookNumber' => '1',
// 'Book' => '1 John',
// 'Chapter' => '4',
// 'StartVerse' => '17',
// 'EndVerse' => false,
// 'QueryType' => 1,
// )
// You can use abbreviations too
$results = sortBibleSearch("Gen 2:5");
// array (
// 'BookNumber' => false,
// 'Book' => 'Genesis',
// 'Chapter' => '2',
// 'StartVerse' => '5',
// 'EndVerse' => false,
// 'QueryType' => 1,
// )
// Also handles start verse and end verse.
$results = sortBibleSearch("1 Corinthians 3:4-5");
// array (
// 'BookNumber' => '1',
// 'Book' => '1 Corinthians',
// 'Chapter' => '3',
// 'StartVerse' => '4',
// 'EndVerse' => '5',
// 'QueryType' => 2,
// )
// If no book is found, returns false.
$results = sortBibleSearch("1 Corinthians 3:4-5");
// false
?>
</div>