The php code needs to return JSON(P)/xml. This is assuming it is available as a web service. David Walsh has a great sample on this method.
The other way is working within a php page and doing it all with php,html. For this you will find an incredible amount of info on the web most using mysql (Just google for the db you want). Here is a very bare bones mysql example.
I like that example because the idea is very simple.
Connect, Select, Create, execute, do something with the result.
You can mix and match all of these in your page for example you can build your PHP query dynamically based on the result of an ArcGIS server webservice query. -> Click on parcel and return the parcel ID. Store parcel ID in a variable. Pass Variable into PHP Query. Search records database using that parcel ID number.
From your comment -
I think my confusion might spring from where exactly the PHP section fits into the overall system architecture. Basically, I've learned that PostgreSQL tables are referenced within ArcSDE which is then used to create a MXD thus allowing the uploading of data to ArcServer. Where does the PHP component fit in exactly? Does it replace ArcSDE or go on before ArcSDE?
ArcGIS server creates a webservice based on your data. This is what gives you the REST/SOAP endpoint. http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/
Esri does the hardwork and gives you a nice Restful endpoint. All you do is click through a menu. PHP fits in if you need to either connect to another database or simple want to connect to the same database to query and process data. It does not replace ArcSDE in any way. PHP is just a language that you can use. You could also use C#, Java, Ruby, etc.