This assumes that you want to use Php with Apache2 on Ubuntu 8.10 Intrepid.
First install libapache2-mod-php5:
sudo apt-get install libapache2-mod-php5
Which will install the following extra packages:
The following extra packages will be installed:
And will remove apache2-mpm-worker (if you have it already installed).
The following packages will be REMOVED:
This will install core Php packages, if you need others search for them:
apt-cache search php |more
And install what you need.