Solved

Apply Source Format

Posted on 2004-10-13
4
419 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now