grep only php files

grep -r "mysql_connect(" --include \*.php

The little snippet above searches all php files in the current and sub-directories for the string mysql_connect(