Solved

Apply Source Format

Posted on 2004-10-13
4
451 Views
Last Modified: 2008-03-10
I have been looking all of the internet, for a program that will format php code into the right standard. IE

Before
if(something){dothis;}else{do this;}

after
if(something){
   Do this;
}else{
   Do this;
}

Macromedia's Dreamweaver has this option but its only for html code. I doens't touch the php.
Any Ideas??
0
Comment
Question by:ocsurf
  • 3
4 Comments
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298525
Take a look at this class from pear:

http://pear.php.net/package/PHP_Beautifier/
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298556
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298655
There is a source code "beautifier" program here also, but this is not free: http://www.textrush.com/formatx.htm

It does however support a range of languages including php.

Shareware download: http://www.tucows.com/preview/355268.html
0
 
LVL 9

Accepted Solution

by:
_GeG_ earned 500 total points
ID: 12306022
and another one, i think it is free:

http://www.waterproof.fr/products/phpCodeBeautifier/

afaik you can customize the output, ie wether you want the opening { in the same line or on the next,...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does != "" mean in programming 8 82
Get a subdirectory name from a url 5 27
Email called spam 5 36
Inserting results of While loop to sql server 5 20
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question