Re: [PHP] replacing part of string with values in array

2001-07-12 Thread Brian White
Shoot from the hip response... untested function resolveParts( $str, $partsArray ) { // explode the original $str based on 'PART' $stringBits = explode( 'PART', $str ); //Ok. So now we have two arrays. The length of partsArray // should be one less than stringBits $

[PHP] replacing part of string with values in array

2001-07-12 Thread Gregor Jaksa
hello, ok heres the thing ;) lets say i have array("part1", "part2", "part3", "part4"); now i have string like $string = "here's PART and heres PART, another PART here and final PART here"; now i wanna replace first PART in string with part1 from array and second PART with part2 from array ... on