Hello all,
I feel kind of bad asking this, I really thought I could get it myself but .....
Ok, here is a file I read into a string:
20020728 ;211952 ;5147697543 ;4186607023 ;5147697543 ;5147697543 ;5009070510 ;18.14 ;18.23330 ;0.7300 ;010101 ;6 ;4 ;1 ;000001030000044000100000000006 ;MONTREAL ;PQ ;CANADA ;QUEBEC ;PQ ;CANADA ; ;CANADA ;CANADA ;001 ; ; ; ;0
every entry ends with a zero. I need to do one of two things: either erase the zero or add a semicolon afterwards. The other zeros must remain untouch. I've tried ereg_replace and preg_replace but i can't seem to find the right regular expression to get the thing done. Either nothing happens or all my zeros get messed up.
Can anyone help?
thanks!
simon