How can I write php code in notepad++?

Firstly, open Notepad++. Then open a new document if a new one is not on the screen already. Then go to the languages menu option, go down to P, and select PHP. Then type in your PHP code. When you want to save it, press the save button near the top right hand corner, and choose a name.

That’s all. Pretty simple, eh?

Just note, other languages can be selected from the languages bar. If you select no languages, it would be default text, but that can be changed too, and after you save the file with a .php extension, Notepad++ will automatically recognise the document as PHP, and render it accordingly.

P.S. If all that seems a smidgen complicated, you might want to read bretterer’s comment. It’s exactly what you should do.

Leave a Comment