This page used to be a guide teaching you how to embed a Gravity Form with PHP. Very recently, Gravity Forms (finally!) added the ability to ‘nicely’ echo the form with PHP, so the guide is no longer needed.
Just so you know how, to echo a Gravity Form with PHP, you can now simply use something like what I’ve included in my imaginary function return statement below:
return "<p>Just fill out the form below to get started: ".gravity_form(4, false, false, false, null, false, 1, false). "<p>Thanks</p>";
The key part is that the last parameter (which says whether or not to echo the returned form) is set to FALSE – And that’s it! No more need for hacks!
Thanks to Elvis for pointing this update out to me!