My PHP files is messed up, how can I auto reformat it?

Discussion in 'PHP' started by goldensea80, Apr 5, 2008.

  1. #1
    My friend gave me his PHP source code but the PHP files is messed up, how can I auto reformat it? I mean to convert to files which have standard newline, indent, etc...
     
    goldensea80, Apr 5, 2008 IP
  2. jimm11

    jimm11 Well-Known Member

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    How are you opening the file. You can use a program like phppad to open it and it should have the correct php format.
     
    jimm11, Apr 5, 2008 IP
  3. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #3
    try opening it with both notepad and wordpad... either one would work. ;)
     
    daboss, Apr 6, 2008 IP
  4. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ull have to do it manually i guess . though try some professional php editors
     
    PowerExtreme, Apr 6, 2008 IP
  5. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #5
    I am using Dreamweaver so it's the problem of code writing, not the editor.
    But I found some solutions, first I try PHP beautifier but it doesn't works quite well. Then I find UniversalIndent and It's OK. Thanks guy for answering :)
     
    goldensea80, Apr 6, 2008 IP