RE: exploding strings
| From: | HP-France,ex1) | Date: | Wed, 20 Nov 2002 10:37:04 +0000 |
| Subject: | RE: exploding strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-125215@lists.php.net to get a copy of this message | ||
heh does the job :)
<?php
$no=("1+2+3");
$number=explode("+", $no);
foreach ($number as $key=>$value){
if ($value==1) {
print '<span style="color:red;">'.$value.'</span>';
}
}
?>
-----Original Message-----
From: Michael P. Carel [mailto:mikecarel@teamglac.com]
Sent: Wednesday, November 20, 2002 5:54 AM
To:
Subject: exploding strings
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.
Any idea. thanx in advance
Regards,
mike