The one from Apache folder is used for the web and the one from the PHP folder is used for the CLI.
If you want to update something on your php.ini related to a problem / an improvement on the web, you should update the one inside the Apache folder.
If you need some fine tuning on a task, which is launched using the CLI version of PHP, you should update the one in the PHP folder.