Jump to content

Easy way to format a php/html file?


therealwesfoster

Recommended Posts

I'm sure where else to post this.. but I was curious.

 

I'm always doing modification for people on their scripts, and when I open the file I see: (example)

 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title></title>
		<meta name="description" content="" />
		<meta name="keywords" content="" />



<link rel="shortcut icon" href="images/logo.ico" />		






	<link rel="stylesheet" type="text/css" href="css/test.css" media="screen" />






                 <link rel="stylesheet" type="text/css" href="css/table_main.css" media="screen" />
        	<link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" />









</head>




















<body id="bd" >


............

</body>

          </html>

(it actually looks cleaner than what it really is because all the spaces are parsed)

 

 

Anyway, my point is this. I'm very picky about my code, so before I do anything, I make it look like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title></title>
  <meta name="description" content="" />
  <meta name="keywords" content="" />
  <link rel="shortcut icon" href="images/logo.ico" />		
</head>

<body id="bd">

........

</body>
</html>

 

 

I was just wondering if there was a program you could load the file into that would parse alot of the newlines and spaces in order for it to look neater? It would save me alot of time and trouble.

 

Anyway, please let me know :)

Link to comment
https://forums.phpfreaks.com/topic/95270-easy-way-to-format-a-phphtml-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.