Filtering Arrays

tom27 08 Feb, 2017
Hi🙂
I have a Listing with CC5 and filter with CF.
In my table i have some fields with multiple values, separated by ';'.
For example Horst; Klaus; Uschi;
I want to filter with a selectbox and single values (Horst - Klaus - ...).
Is it possible?
Thanks, tom
GreyHead 08 Feb, 2017
Hi tom27,

You can use the PHP explode(';', $variable_name); to convert a list to an array.

Bob
tom27 08 Feb, 2017
Thanks Bob,

i solved it with conditions.
<?php
$filter = $this->data['selectbox_name'];
return array( 'Field_name LIKE' => '%'.$filter.'%' );
?>

tom
This topic is locked and no more replies can be posted.