changed $word to search with '%' . $word . '%' instead of . $word . '%';