KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a chatlog file that looks like this (name represents screenames and text is their chat string) name: some text name2: more text name: text name3: text I want to color all names up to the : red. For example: <font color=red>myname:</fontcolor> hello How would I do this? I'm not sure why, but this code colors everything after the colon echo preg_replace('/(.*?):/', "<font color=#F00>$1</font>:", $output);
Tags (comma-separated)
Save Edits
Cancel