recherche intelligente de gens
[auf_rh_dae.git] / project / media / jquery-autocomplete / demo / emails.php
1 <?php
2 $q = strtolower($_GET["q"]);
3 if (!$q) return;
4 $items = array(
5 "Peter Pan"=>"peter@pan.de",
6 "Molly"=>"molly@yahoo.com",
7 "Forneria Marconi"=>"live@japan.jp",
8 "Master Sync"=>"205bw@samsung.com",
9 "Dr. Tech de Log"=>"g15@logitech.com",
10 "Don Corleone"=>"don@vegas.com",
11 "Mc Chick"=>"info@donalds.org",
12 "Donnie Darko"=>"dd@timeshift.info",
13 "Quake The Net"=>"webmaster@quakenet.org",
14 "Dr. Write"=>"write@writable.com"
15 );
16
17 $result = array();
18 foreach ($items as $key=>$value) {
19 if (strpos(strtolower($key), $q) !== false) {
20 array_push($result, array(
21 "name" => $key,
22 "to" => $value
23 ));
24 }
25 }
26 echo json_encode($result);
27 ?>