i think its not possible with php. I use javascript to do this...
The only thing I know how to do is say you have
Status: <select name="status">
<option value="married">married
<option value="single">single
</select>
Spouse: <input type="text" name="spouse" value="">
if the user chooses single, the text filed for spouse will say "Not applicable" if they choose married, the text field will say 'please enter full name'
I did see the use of javascript to add a box, but I dont' remember what site it was. Basically you would type in the form entirely in javascript. You would tell javascript to display the general forms. then depending on certain conditions, expand the page to put this form in...