I think this is done in Apache httpd.conf
See the Apache/conf/ ... folder
You could make Virtual Hosts
# Almost any Apache directive may go into a VirtualHost container.
So you could possibly use this for each VirtualHost: PHPIniDir "C:/Program/PHP"
But I am not sure exactly how to do it.
Maybe like this something:
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
PHPIniDir "C:/Program/PHP"
DocumentRoot "C:/Program/Apache2.2/docs/dummy-host.11.22.33.44"
ServerName dummy-host.11.22.33.44
ServerAlias www.dummy-host.11.22.33.44
</VirtualHost>