• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RESOLVED Attribute array

Messages
5
Likes
0
Points
1
#1
Is this possible? We'd like to show posts from two taxonomy terms. So we use
Code:
[wbcr_php_snippet id="415" title="Testimonials: studievariant" studievariant="voltijd, deeltijd"]
but that shows nothing. If we echo the variable, we do get results. If we use one argument, we get results as well. Is using comma separated values for attributes not supported? Thanks in advance.
 

Temyk

Developer & Support
Staff member
Messages
744
Likes
32
Points
28
#2
Hello.

In the snippet, you accept the value of their attribute. Then you can do whatever you want with it. For example you received:
PHP:
$studievariant ="voltijd, deeltijd";
You can divide this text into parameters:
PHP:
$array = explode(',', $studievariant);
/*
$array = [
    'voltijd',
    'deeltijd',
];
*/