Announcement

Collapse
No announcement yet.

Is there a tool to format php pages nicely?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a tool to format php pages nicely?

    Ever get errors because while changing around your php file you had too many or too little tabs and ended ifs too soon or too late? Me too.

    Has anyone created a tool which knows all the php rules (including comments and "ifs" that end within one line like so

    PHP Code:
    if ($xyz=5$TUV=10
    )

    that will take a .php file and automatically insert the correct number of tabs so you can easily see where a function, if, else etc ends? If so, please let me know! I'd love to get one. Thank you.

  • #2
    Don't use Dreamweaver or Frontpage to do the job, try to avoid notepad or wordpad too!

    You can use it, but it might change the code on itself.

    I advice using a text editor like UltraEdit, it has php highlighting which helps you overlook the source code. And it leaves the tabs,spaces and linewrapping in tact.

    Comment


    • #3
      Originally posted by floris
      Don't use Dreamweaver or Frontpage to do the job, try to avoid notepad or wordpad too!

      You can use it, but it might change the code on itself.

      I advice using a text editor like UltraEdit, it has php highlighting which helps you overlook the source code. And it leaves the tabs,spaces and linewrapping in tact.
      I've been using Ultraedit for some time. It will make nice colors fitting php, true. But you can't push a button and have it add and remove tabs and whitespace from the "ifs" "elses" "cases" etc.

      Comment


      • #4
        As long as you use ultraedit or editplus and programs like that then you don't ever have this problem Zend Studio seems pretty good too !
        Dean Clatworthy - Web Developer/Designer

        Comment


        • #5
          PHP Beautify will indent and make the code look like you want.
          vBulletin.org Moderator
          The Sisters Three Charmed Discussion Forums

          Comment


          • #6
            Originally posted by NTLDR
            PHP Beautify will indent and make the code look like you want.
            Thnk you!

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X