Title: problems with php code highlight
Last modified: August 18, 2016

---

# problems with php code highlight

 *  [olederer](https://wordpress.org/support/users/olederer/)
 * (@olederer)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/)
 * Hello,
    I think I tried all existing code highlight plugins but with all of them
   I have the same problem:
 * php code like this is parsed by WP 2.04 as html and not als highlighted code:
 * `
    foreach ($parent_array as $pkey => $pval) { if (!empty($pval['count'])) { 
   $menu .= " <li><a>".$pval['label']."</a></li> n"; } else { $menu .= " <li><a>".
   $pval['label']."</a></li> n"; } } EDIT: check this [image](http://picasaweb.google.com/olaf.lederer/MySharedPictures/photo#4989196510364696594)
   that shows the code, Why? because I have the problem at this blog too!
 * the problems are with list items which are becomming list items other PHP code
   is parsed well (never has this problem in regular php powered websites).
 * Which WP filter need be changed? (without loosing protection)?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [olederer](https://wordpress.org/support/users/olederer/)
 * (@olederer)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/#post-469725)
 * Just noticed that code with backticks is parsed right but what if I need code
   coloring ? and why is teh href attribute changed into xhref?
 *  Thread Starter [olederer](https://wordpress.org/support/users/olederer/)
 * (@olederer)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/#post-470035)
 * Hello,
 * is there no one with this problem?
    It looks to me that this is a 2.04 problem…
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/#post-470036)
 * The majority of WP users are not interested in posting code.
    If you think it’s
   a genuine bug – this is the place to report it: [http://trac.wordpress.org/](http://trac.wordpress.org/)
 *  Thread Starter [olederer](https://wordpress.org/support/users/olederer/)
 * (@olederer)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/#post-470050)
 * Hello Moshu,
    I don’t wanna post code but want to comment code in my blogs.
 * So if I need to parse code in my blog site I need to use a diff. blog software?
 * Edit: by the way its possible to post code via the wordpress hosted blog site…

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘problems with php code highlight’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [olederer](https://wordpress.org/support/users/olederer/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/problems-with-php-code-highlight/#post-470050)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
