At 05:54 20.11.2002, Michael P. Carel said:
--------------------[snip]--------------------
>Hi to all,
>
>I have a problem regarding  exploding string. I want to explode string
>sepated by "+" sign, but i want it also the first variable in the array be
>distinc in terms of collor or whatever when viewed in the page.
>
>ex.
>
>$no=("1+2+3");
>$number=explode("+", $no);
>
>how could i echo $no with the first no. "1"  be in colored.
--------------------[snip]-------------------- 

You need to handle the first element separately, then chime in with the rest:

$string = '1+2+3';
$as = explode('+',$string);
echo '<font color="red">',array_shift($as), '</font>, ', join(', ', $as);


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to