Hello
can i explode $opt->value using a delimiter and populate a dbjoin element with the array values? I'm using a dbjoin because the values are dinamically retrieved from database.
Let's say the $opt->value looks like (string) "value1|value2|value3". I tried to convert this string to array using explode and populate the dbjoin options, but all i can get is value = "value3", label = "value3"
How can i populate the dbjoin element like:
<select name"..">
<option value="value1">value1</option>
<option value="value2">value2</option>
<option value="value3">value3</option>
</select>
Thank you
can i explode $opt->value using a delimiter and populate a dbjoin element with the array values? I'm using a dbjoin because the values are dinamically retrieved from database.
Let's say the $opt->value looks like (string) "value1|value2|value3". I tried to convert this string to array using explode and populate the dbjoin options, but all i can get is value = "value3", label = "value3"
Code:
$tests = explode("|",$opt->value);
foreach ($tests as $test) {
$opt->value = $test;
$opt->text = $test;
}
How can i populate the dbjoin element like:
<select name"..">
<option value="value1">value1</option>
<option value="value2">value2</option>
<option value="value3">value3</option>
</select>
Thank you