Since Mac OS comes with PHP bundled, even if you have MAMP, you'll find out that you can't use MAMP's versions on the command line. This is only true if you use the free version of MAMP since MAMP pro seems to have a feature to add that to the cli automatically.
In this file, you might see nothing or only a few configurations already. You can safely ignore them and add this lower:
PHP_VERSION=$(grep "^[^#\;]" "/Applications/MAMP/conf/apache/httpd.conf" | grep "LoadModule php" | awk -F'[\/]' '{print $6}')
export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH
export PATH=/Applications/MAMP/Library/bin:$PATH