forked from joshfraser/PHP-Name-Parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.php
37 lines (31 loc) · 990 Bytes
/
examples.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
<?php
include("parser.php");
$names = array( "Mr Anthony R Von Fange III",
"Sara Ann Fraser",
"Adam",
"Jonathan Smith",
"Mr John Doe",
"Rev. Dr John Doe",
"Anthony Von Fange III",
"Anthony Von Fange III, PhD",
"Smarty Pants Phd",
"Not So Smarty Pants, Silly",
"Mark Peter Williams",
"Mark P Williams",
"Mark P. Williams",
"M Peter Williams",
"M. Peter Williams",
"M. P. Williams",
"MP Williams",
"The Rev. Mark Williams",
);
$parser = new FullNameParser();
foreach ($names as $name) {
echo "<b>{$name}</b><br>";
$split_name = $parser->split_full_name($name);
echo "<pre>";
print_r($split_name);
echo "</pre>";
echo "<hr>";
}
?>