Title: Remove comma (,) from values
Last modified: April 14, 2020

---

# Remove comma (,) from values

 *  Resolved [petenam](https://wordpress.org/support/users/petenam/)
 * (@petenam)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/remove-comma-from-values/)
 * Howdy there.
    Whenever I use the multiselect I get the comma in between the selected
   values ex: value1, value2, value3
 * Is there a way to remove it and only be left with an empy space between the values?
 * Much Obliged
    PeteN

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Luke Carbis](https://wordpress.org/support/users/lukecarbis/)
 * (@lukecarbis)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/remove-comma-from-values/#post-12682801)
 * Hi [@petenam](https://wordpress.org/support/users/petenam/),
 * If you’re using the `block_field()` function, Block Lab will output the value
   in a readable way, which in this case, includes commas.
 * But if you use `block_value()` instead, Block Lab will only return the value (
   not output it), and in the case of a multiselect, it will be returned as an array.
 * So, you could do something like this:
 *     ```
       $multiselect_value = block_value( 'multiselect' );
       echo implode( $multiselect_value, ' ' );
       ```
   
 * Here, `implode` turns the array values into a string, with an empty space as 
   the delimiter.
 * Hope that helps!
 *  Thread Starter [petenam](https://wordpress.org/support/users/petenam/)
 * (@petenam)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/remove-comma-from-values/#post-12682826)
 * Perfect!!!
    That did it

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove comma (,) from values’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/block-lab_5c34e8.svg)
 * [Block Lab](https://wordpress.org/plugins/block-lab/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-lab/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-lab/)
 * [Active Topics](https://wordpress.org/support/plugin/block-lab/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-lab/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-lab/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [petenam](https://wordpress.org/support/users/petenam/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/remove-comma-from-values/#post-12682826)
 * Status: resolved