Search found 6 matches

by kayeb
Sat Dec 20, 2003 5:48 am
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

Thanks Weirdan, that helps explain the pattern. I did check PHP.net for the pre_match_all function but still couldn't make head or tail of the string pattern, but now I know :D I still have a minor problem with the code though as I get an error 'Wrong parameter count for mysql_fetch_row()'. I can't ...
by kayeb
Fri Dec 19, 2003 6:09 am
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

Also, could someone please explain the contents of the preg_match_all string pattern, because I don't quite understand it (a bit thick I guess)

Thanks,
by kayeb
Fri Dec 19, 2003 5:38 am
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

Although I cannot get it to work. I noticed a typo but still can't get it working ... any ideas? $myString='Some of the colors present are {red}, {yellow} and {purple}, but {black} or {a noodle} are nowhere to be seen'; preg_match_all("/{([^}]+)}/",$myString,$matches,PREG_MATCH_ORDER); if(...
by kayeb
Fri Dec 19, 2003 3:02 am
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

Thank you Weirdan.
It is much appreciated.

(And I'm pretty sure I understand it too, hehehe!)
by kayeb
Thu Dec 18, 2003 1:18 pm
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

Yes that helps. Thank you very much JAM. Hmmm, one thing though. Say my table of had 10,000,000 rows in it, would it still be practical to do it that way? i.e. retrieve all of the rows and place them in an array and then compare the relevant string parts for replacement? Or am I not looking at it th...
by kayeb
Thu Dec 18, 2003 12:37 pm
Forum: PHP - Code
Topic: String manipulation
Replies: 10
Views: 998

String manipulation

Hi, I am a complete newbie and was wondering if anyone could point me in the right direction please. I have a string ($myString) which consists of - 'Some of the colors present are {red}, {yellow} and {green}, but {black} or {sky blue} are nowhere to be seen' I also have a table with these colors in...