How do I add code to a post at phphelp

I have tried to add code in 2 posts in this forum.

each time XML code is not displayed and php gets changed.

None of the editing buttons help me, nothing in FAQ

See screenshot https://i.imgur.com/VEVnbKH.png

To answer my own question.

</> Button in editor

Allows me to add code ‘as is’

When I tried it it just seemed to indent and grey background was nearly invisible on my screen.

What I find useful sometimes is to paste the PHP code, highlight the PHP by right clicking the mouse and then clicking the code button in order to have the code formatted correctly.

Thanks for the suggestion.

I thought I had tried all buttons. Is the code button different to the preformatted text button which seems to work OK?

Adding three back ticks, `, will format and add code highlighting.

Sponsor our Newsletter | Privacy Policy | Terms of Service