ich habe in einer moduleingabe ein select:
Code: Alles auswählen
<?php
$value5 =<<<EOD
REX_VALUE[5]
EOD;
$default = '';
$value5 = ($value5 == '') ? (array) $default : split('~~', $value5);
$select = new select();
$select->set_name('VALUE[5][]');
$select->multiple(true);
$cats = OOCategory::getChildrenById(6);
foreach($cats as $val){
$id = $val->getId();
$name = $val->getName();
$select->add_option($name, $id);
}
foreach($value5 as $val){
$select->set_selected($val);
}
echo $select->out();
?>
Code: Alles auswählen
<?php
// -------------- CONFIG
$value_id = range(1,10);
$value_sep = '~~';
// -------------- END OF CONFIG
$values = (array) $value_id;
foreach($values as $value_id)
{
$value = $REX_ACTION['VALUE'][$value_id];
echo "$value_id = $value<br>";
$str_value = '';
if(is_array($value))
{
$str_value = implode($value_sep, $value);
}
else
{
$str_value = $value;
}
$REX_ACTION['VALUE'][$value_id] = $str_value;
}
?>
was mach ich da falsch?Warning: stripslashes() expects parameter 1 to be string, array given in C:\xampp\htdocs\angieneering\redaxo\include\classes\variables\class.rex_var_value.inc.php on line 25
danke...