Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically indent auto-generated code using php [duplicate]

Possible Duplicate:
How can I beautify JSON programmatically?

I have build a code generator that gives me a .js file as output with the javascript in it. The code works fine but the only problem is for the indentation.

I have written my code generator in php. Can anyone suggest me a library or something else that will help me to auto indent my generated code in php.

like image 607
Ajeet Pratap Maurya Avatar asked Jun 11 '26 04:06

Ajeet Pratap Maurya


1 Answers

Try it: They have extensions, library, etc.

http://jsbeautifier.org/

like image 65
viruskimera Avatar answered Jun 13 '26 13:06

viruskimera



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!