Multiple values in shortcode

So, following is used in a shortcode: [my_shortcode dfd_name="Steve"]

if(strstr($key, 'dfd'))
            {
                $metaquery[] = array(
                        'key' => $key,
                        'value' => $val,                            
                        'compare' => 'LIKE',
                        'terms' => explode(",",$val)
                                );  
            }

However, I am trying to make it so that I can put multiple values in the dfd_name like the following: [my_shortcode dfd_name="Steve, Mike"], but it is not working in terms of the multiple values. It picks up as “Steve, Mike” as one word. What am I doing wrong?


Source: shortcode

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.