I have a foreach loop that gives me a number of values after looping through an array, like so:
842,844,841,839,838
This is the loop:
foreach ($values as $valuesKey => $value) {
echo $valuesKey . ',';
}
I need to work with those values after the loop finishes, how can I go about it? I want to put the list of values into another function. Is this even possible??
do_shortcode('[playlist type="audio" ids="/* values should go here */"][/playlist]');
It's supposed to look like this if it works:
do_shortcode('[playlist type="audio" ids="842,844,841,839,838"][/playlist]');
Thanks for anyone who can point me into the right direction!