WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say that i have this array:

Array ( [0] => 13 [1] => 7 )

And this array is for example "print by <?php print_r($_categories); ?>

but now, how to make a array implode to this format: 13,7 (without comma after the last value)

Thanks, nelson

share|improve this question

closed as off topic by Brian Fegter, toscho Jul 26 '12 at 14:19

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This is a question for Stack Overflow. Also, you can easily search PHP impload. You get this: php.net/manual/en/function.implode.php Try Google first. It works really well. :) – Brian Fegter Jul 26 '12 at 14:07

This is an inbuilt PHP function:

$result = implode($input, ',');

(as noted by Brian's comment.

share|improve this answer
Thanks for the replies! I'm going to move this question to Stack Overflow. – naires Jul 26 '12 at 14:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.