# Changing the color of a text

**URL:** <https://forum.kirupa.com/t/changing-the-color-of-a-text/279134>\
**Category:** Uncategorized\
**Created:** [January 9, 2009, 9:57pm UTC](https://forum.kirupa.com/t/changing-the-color-of-a-text/279134 "2009-01-09T21:57:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gencoglu](https://forum.kirupa.com/u/gencoglu)\
**Post date:** [January 9, 2009, 9:57pm UTC](https://forum.kirupa.com/t/changing-the-color-of-a-text/279134/1 "2009-01-09T21:57:44Z")

</div>

Hi, I want my text change if the answer is true …I have the following line but it doesnot work ? any help ?

```php

_root["sonuc"+i].htmlText='<font color="red">good job</font>';  

 

```
