6

Possible Duplicate:
Syntax highlighting language hints
Changes to syntax highlighting

I just asked a question on SO Facebook API scope and it's refusing to do a syntax highlight on my PHP code.

Is there anything extra required other than four spaces before each code line?

marked as duplicate by Time Traveling Bobby, Pops, kiamlaluno, ChrisF, Lorem Ipsum Jan 28 '12 at 22:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

14

As announced in 2010 and specified on the Markdown Help Page, you have to either to tag with php or use one of the prettify language codes (<!-- language: lang-php -->) before the code.

E.g.

<!-- language: php -->

    // This is some PHP
    phpinfo();

https://github.com/google/code-prettify

  • Adding <?php at the beginning break formatting. – jcubic Oct 26 '18 at 15:07

Not the answer you're looking for? Browse other questions tagged .