Open your .bashrc or .zshrc file and add:
# Mamp PHP Path
export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH
The version number here should correspond to the version you're using in MAMP.
Next, open /Applications/MAMP/bin/php/php5.6.10 and add a folder called include and within that a folder called php