If you are using Z Shell, just do the following:
- Open terminal
- sudo
nano ~/.zshrc
- Paste this;
export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH
- Save
- Run
source ~/.zshrc
- Run
which php
- you should get the MAMP 5.6.10 path
5.6.10 is the version of PHP you set in your MAMP.