Problem adding suffix using implode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bpgillett
Forum Newbie
Posts: 11
Joined: Mon Jul 26, 2004 3:25 am

Problem adding suffix using implode

Post 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
bpgillett
Forum Newbie
Posts: 11
Joined: Mon Jul 26, 2004 3:25 am

Post 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.
Post Reply