If you want to just find a keyword in only specific file type let's say php files. You can use find command.
-type f :look into files only
-name '*.php' :for file extension php only
-exec :executing grep
find ./ -type f -name '*.php' -exec grep -H --line-number --color "my keyword" {} \;