Hey Guys, Anyone know of any software for reformatting php code. I want to convert: if(!isset($_SESSION["language"]) || $_SESSION["language"]=="") { $_SESSION["language"]="English"; $language="English"; } else { $language=$_SESSION["language"]; } PHP: to if(!isset($_SESSION["language"]) || $_SESSION["language"]=="") { $_SESSION["language"]="English"; $language="English"; } else { $language=$_SESSION["language"]; } PHP:
You can use a text editor and find and replace to get the correct formatting. Dreamweaver has a good, multi-line find and replace function. Is there any specific reason you want to do this? The first example is more accepted as the correct way to format code.
Software - keyboard driver .. Press BACKSPACE or TAB to edit your code .. there is no need for a special software ! Ahh, anyway .. you can use : MS FrontPage, Notepad++, Dreamviewer, etc.
Thanks for the replies. I find it a lot easier to read the code my way and takes up less lines. Just a personal preference. I'll try the multi line search a try.
Nah, use a program with a built-in beautifier... I use phpDesigner and Zend Studio personally, and of the two I would say Zend has the more powerful beautifier, I use it for literally every piece of code I write. Vital tool for any professional.
just use the function import_request_variables() to avoid the isset(). the posted value will automatically come to php part while submitting the form....