How to make apache2 use php 5.4.5 compiled from source?

view story

http://askubuntu.com – As most of us ubuntu users know, 12.04 comes with it's own version of Perl and PHP (5.3.10). Recently I compiled apache 2.2.22 and PHP 5.4.5 from source, and when I open a terminal to php -v, it shows 5.4.5. However in phpinfo() it shows the preinstalled 5.3.10 which means apache2 is using that version. Do I have to remove 5.3.10? Or configure apache2 so that it uses php 5.4.5? If I'm supposed to configure it, please do tell me how, and what to sudo nano. BTW it is only for learning HTML/CSS/PHP, and I'm on Ubuntu 12.04 Desktop. (HowTos)