Results 1 to 15 of 15
-
01-06-2007, 02:29 AM #1Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
Is there a program to organize php code to look neater?
I know with Dreamweaver if you use the "apply source formatting" option it automatically adds spaces to html code to make it easier to read, and I was wondering if there was any software that offers the same thing but with php code? I would think there is since a few years ago I had a friend work on a php file and he managed to organize over 700 lines of code and I doubt he did all of that manually. Thanks.
-
01-06-2007, 02:31 AM #2Web Hosting Guru
- Join Date
- May 2006
- Location
- Teh Interweb
- Posts
- 314
Lots of modern programming editors will have options to auto indent and syntax highlight which make reading the code much easier. What OS are you running and I will let you know which ones I like.
[theBleeber@wht01] ~ $ cat .signature
cat: .signature: No such file or directory
-
01-06-2007, 02:33 AM #3Junior Guru
- Join Date
- Nov 2006
- Location
- College Station, TX
- Posts
- 185
Yep! It's pretty simple. It's callled the 'tab' key.
-
01-06-2007, 02:43 AM #4Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
I use Windows XP. I doubt he manually spaced out and made every single line of code nice and pretty in less than a day. It was a bad script written by someone who just added php code all on the same line and my friend spaced out everything neatly like a default phpBB type file. If Dreamweaver can automatically space out html code I would assume there is a program that does that for php as well.
-
01-06-2007, 03:08 AM #5Web Hosting Guru
- Join Date
- May 2006
- Location
- Teh Interweb
- Posts
- 314
If I am ever on a windows machine, I typically use textpad. What you are looking for is an editor with the "Beautify Code" option, or somthing to that effect. Why not ask your friend how he/she did it?
[theBleeber@wht01] ~ $ cat .signature
cat: .signature: No such file or directory
-
01-06-2007, 08:52 AM #6WHT Addict
- Join Date
- Mar 2006
- Location
- London, UK
- Posts
- 125
I would recomend Zend Studio, Its has all the features your could ever want.
CVS, SVN, Code Highlighter, Mysql Inter, Project management, Code indenter etc...
Hope this helps.
-
01-06-2007, 10:30 AM #7WHT Addict
- Join Date
- Feb 2004
- Posts
- 170
http://www.waterproof.fr/products/phpCodeBeautifier/ is a free tool that does exactly that - you just specify how you want certain things to be formatted (e.g. brace positions) and it does it for you.
-
01-06-2007, 12:52 PM #8Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
I use TotalEdit as PHP software editing. I also use DZSoft PHP Editor.
-
01-06-2007, 05:21 PM #9Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
Thanks guys I will check it out later
-
01-07-2007, 03:21 AM #10Web Hosting Master
- Join Date
- Dec 2003
- Location
- Vancouver BC, eh?
- Posts
- 571
Eclipse has this as well. Source -> Format Document or Source -> Format Active Elements.
-
01-07-2007, 04:03 AM #11Disabled
- Join Date
- Jan 2006
- Posts
- 297
I use editplus. http://www.editplus.com/
-
01-08-2007, 07:36 AM #12Disabled
- Join Date
- Dec 2006
- Posts
- 10
If you are using any editors like Dream Weaver,Zend it will help to make it clean.If you are looking indending facility I think DW is fine
-
01-08-2007, 09:32 AM #13Newbie
- Join Date
- Dec 2006
- Location
- Montréal
- Posts
- 19
Hi,
There's a program called SourceFormatX. Check it out:
textrush.comPalmHost - A Montréal based Web hosting company
▌ cPanel w/Fantastico & Online SiteBuilder (+200 royalty free website templates)
▌ Bilingual Support (English & French)
▌ 30 Day Unconditional Money Back Guarantee
-
01-10-2007, 01:09 PM #14Junior Guru
- Join Date
- Jul 2006
- Location
- India
- Posts
- 237
If you are using dream weaver ,it is supplying a facility to apply source formatting.
It will make the HTML tags and PHP codes to look better
If you are looking for good indenting,there is zend studio that will automatically format the code,provided wrapping must be turned off
-
01-18-2007, 11:45 PM #15Junior Guru Wannabe
- Join Date
- Dec 2006
- Posts
- 76
Originally Posted by Olate