Results 1 to 15 of 15
  1. #1

    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.

  2. #2
    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

  3. #3
    Join Date
    Nov 2006
    Location
    College Station, TX
    Posts
    185

  4. #4
    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.

  5. #5
    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

  6. #6
    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.


  7. #7
    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.

  8. #8
    Join Date
    Mar 2006
    Posts
    984
    I use TotalEdit as PHP software editing. I also use DZSoft PHP Editor.

  9. #9
    Thanks guys I will check it out later

  10. #10
    Join Date
    Dec 2003
    Location
    Vancouver BC, eh?
    Posts
    571
    Eclipse has this as well. Source -> Format Document or Source -> Format Active Elements.

  11. #11
    I use editplus. http://www.editplus.com/

  12. #12
    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

  13. #13
    Join Date
    Dec 2006
    Location
    Montréal
    Posts
    19
    Hi,

    There's a program called SourceFormatX. Check it out:

    textrush.com
    PalmHost - 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

  14. #14
    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

  15. #15
    Join Date
    Dec 2006
    Posts
    76
    Quote Originally Posted by Olate
    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.
    Works great. It's fast and easy, and it'll even run on linux! (through wine)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •