Takeing a string and spliting it up.
| From: | Ian LeBlanc | Date: | Sat, 25 Nov 2000 03:51:17 +0000 |
| Subject: | Takeing a string and spliting it up. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27084@lists.php.net to get a copy of this message | ||
Here is the string...
<?
script = "
Spies<BR>
Troops<BR>
Jets<BR>
Turrets<BR>
Tanks<BR>
Nuclear Missiles<BR>
Chemical Missiles<BR>
EMD Missiles<BR>
<TD NOWRAP ALIGN=RIGHT><FONT COLOR=#FFEECC SIZE=-1>
0<BR>
401,096<BR>
771,923<BR>
552,269<BR>
103,164<BR>
1<BR>
3<BR>
1<BR>";
?>
How could I parse that to get this output (need all the numbers to be in
varibles also)
Spies: 0
Troops: 401,096
Jets: 771,923
Turrets: 552,269
Tanks: 103,164
Nuclear Missiles: 1
Chemical Missiles: 3
EMD Missiles: 1