gnu-social/plugins/Autocomplete/jquery-autocomplete/demo/images.php

10 lines
183 B
PHP
Raw Normal View History

2009-08-06 19:39:59 +01:00
<?php
$term = $_REQUEST['q'];
$images = array_slice(scandir("images"), 2);
foreach($images as $value) {
if( strpos(strtolower($value), $term) === 0 ) {
echo $value . "\n";
}
}
?>