Antonella Posted December 5, 2006 Share Posted December 5, 2006 Hi,I have a question for all you phpers :)A friend of mine has made a little php page which read an xml file output by a program.Now in this file there are numers preceded by this sign '^' what he would like to do is assign each number a different color so that the text following it takes that colore.g.^1 = red^2 = greenetc...if we have^1TEXTthis should show[color=red]TEXT[/color]so how do we tell php that ^1 = red and that the output should be [code]<font color="red">TEXT</font>[/code] ?I know this is not clear, if you need to see the pages I'm talking about they're here:http://warsow.itlanet.net/master.xml http://warsow.itlanet.net/master.phpthanks for any help :) Link to comment https://forums.phpfreaks.com/topic/29563-assign-colors-to-specific-text/ Share on other sites More sharing options...
drifter Posted December 5, 2006 Share Posted December 5, 2006 what is at the other end of the string to change colors? a closing delimiter? a new line? Link to comment https://forums.phpfreaks.com/topic/29563-assign-colors-to-specific-text/#findComment-135647 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.