I hope they are fine.
I have the following function in PHP that is supposed to be receiving an array but it is taking it as a string.
Can someone help me finding the error please.
This is my code:
public function getCustomfielForSegment($arrIds) {
$arrid = explode(",", $arrIds);
$whereids = array();
foreach ($arraid as $key){
$whereids[] = $key;
}
$where = array("idSegment" => array('$in' => $whereids));
$segment = /Segment::find(where);
$arrIdContactList = array();
foreach ($segment as $key => $val) {
foreach ($val->contactlist as $key) {
$arrIdContactList[] = (Int) $key ['idContactlist'];
}
}
Any help you can give me could be very useful.
Thank you very much