PHP is a suitable language. If you're trying to search for a term in a database, then MySQLi or PDO is your best option. Sanitise the search term, bind to the query and fetch the relevant result(s).
Do what as you would with the returned result set.
If I understood correctly, is this basically what you're asking?