Autocomplete with Redis
Here is a PHP implementation of Antirez’s autocomplete example in Ruby using Redis. The full explanation for this algorithm can be found here:
http://antirez.com/post/autocomplete-with-redis.html
I’m using the Redis php extension, you can download it here:
http://github.com/owlient/phpredis
Here is the code :