Page 1 of 1

Problem adding suffix using implode

Posted: Mon Jul 26, 2004 3:43 pm
by bpgillett
i appologize for re-opening this topic. i'm still having difficulty adding a suffix to a few different words in a string (deliminated by spaces) using explode and implode. the prefix gets added to all words properly.

feyd suggested:

Code: Select all

$n_instrumentation = ' +' . implode(' +',$temp) . ' +';
however, this only adds the suffix to the last word of the string.
thanks for any more suggestions.

--brian

Posted: Mon Jul 26, 2004 7:44 pm
by bpgillett
well...after a fair amount of research, i have concluded that suffix's can't be added to individual items within a deliminated text string using implode/explode. i just gave up and exploded the string-->then used 'foreach' to run the array appending each item.