mirror of
https://github.com/WebStackPage/WebStackPage.github.io.git
synced 2026-02-07 12:23:39 +08:00
update
This commit is contained in:
24
data/typeahead-generate.php
Normal file
24
data/typeahead-generate.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Typeahead Auto Suggestions Generator
|
||||
*
|
||||
* Laborator.co
|
||||
* www.laborator.co
|
||||
*/
|
||||
|
||||
$q = "Hello world";
|
||||
|
||||
if(isset($_REQUEST['q']) && trim($_REQUEST['q']))
|
||||
$q = $_REQUEST['q'];
|
||||
|
||||
$items = array();
|
||||
|
||||
$items[] = array("value" => $q . substr(str_shuffle($q), 0, 1));
|
||||
$items[] = array("value" => $q . ' - ' . strrev($q));
|
||||
$items[] = array("value" => str_shuffle($q));
|
||||
$items[] = array("value" => $q . mt_rand(10,99999));
|
||||
|
||||
shuffle($items);
|
||||
|
||||
|
||||
echo json_encode(array_values($items));
|
||||
Reference in New Issue
Block a user