Easiest way to install Eclipse is to use the Ubuntu Software Centre. Searching for Eclipse will give you the version you need.
- Note: With Ubuntu Unity (12.04 LTS), using the Ubuntu Software Centre, the package "Eclipse" does not work properly. Eclipse returns an error message when you start it. Instead, try the package "Extensible Tool Platform and Java IDE", it includes a working Eclipse :)
Official instructions for installing Eclipse IDE: https://help.ubuntu.com/community/EclipseIDE
For an all-in-one guide, including local debugging set-up, follow Debugging PHP in Ubuntu using Eclipse.