# Syntax highlighting

**URL:** <https://forum.kirupa.com/t/syntax-highlighting/259686>\
**Category:** Uncategorized\
**Created:** [May 7, 2008, 8:15pm UTC](https://forum.kirupa.com/t/syntax-highlighting/259686 "2008-05-07T20:15:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [May 7, 2008, 8:15pm UTC](https://forum.kirupa.com/t/syntax-highlighting/259686/1 "2008-05-07T20:15:24Z")

</div>

Ok, Im setting up a small tutorial section for my site that pulls the tutorials from a mysql database…

I have set up a

````auto
 tag which in php, before echoing searches for the opening and closing tag and makes a div to surround them.

I want to know, how could I have a 
```php
 tag with php syntax highlighting with it... ive got the function 

```php

<?php highlight_string(''); ?>

````

but im unsure how to add that to my current set up:

```php

[noparse]
 <?php
//Code Tags
    $bodynew1 = str_replace("

```

“, “\<div class=“codetitle”\>Code\<div class=“code”\>”, “$body”);  
$bodynew2 = str\_replace(”

````auto
", "</div></div>", "$bodynew1");
//PHP Tags
    $bodynew3 = str_replace("
```php
", "<div class=\"codetitle\">PHP<div class=\"code\">", "$bodynew2");
    $bodynew4 = str_replace("

````

", “”, “$bodynew3”);  
echo $bodynew4; ?\>  
[/noparse]

```auto
how would I add it?

Thanks.
```

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [May 8, 2008, 6:38pm UTC](https://forum.kirupa.com/t/syntax-highlighting/259686/2 "2008-05-08T18:38:52Z")

</div>

bumpity bump…

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [May 8, 2008, 7:19pm UTC](https://forum.kirupa.com/t/syntax-highlighting/259686/3 "2008-05-08T19:19:09Z")

</div>

GeSHi
