Support

Account

Home Forums Front-end Issues Select – multiple but with word before

Solved

Select – multiple but with word before

  • I am using select field and have multiple.

    I’ve used the implode to show all that’s been selected;

    $cat = get_field('categories', $post_id);
    <?php echo implode(' ', $cat); ?>

    and I want to add “category-” in front of each outputted select field, but can’t work out how?????

  • 
    <?php echo 'category-',implode(' category-', $cat); ?>
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Select – multiple but with word before’ is closed to new replies.