rcx21000
04-13-2004, 07:08 AM
I have a textfile thats made like this:
thing description
thing description
thing description
...
I can read it, and seperate "thing" and "description", if they are both one word, but they need to be lots of words. The only way that I can think to fix it would be replace all the " " with "|", except the ones that seperate "thing" and "description". Is there a way in PHP to replace all "|" with " " after I've seperated "thing" and "description? If you don't get me, then what I need is a function that will work something like "replace" in VB:
Replace("This|is|a|string|thing.", "|", " ") will give "This is a string thing"
I've googled it, and can't find the answer, either :(
thing description
thing description
thing description
...
I can read it, and seperate "thing" and "description", if they are both one word, but they need to be lots of words. The only way that I can think to fix it would be replace all the " " with "|", except the ones that seperate "thing" and "description". Is there a way in PHP to replace all "|" with " " after I've seperated "thing" and "description? If you don't get me, then what I need is a function that will work something like "replace" in VB:
Replace("This|is|a|string|thing.", "|", " ") will give "This is a string thing"
I've googled it, and can't find the answer, either :(