- //when our string is an array we will treat it as an array from that . onwards
- $count = count($stringParts);
- while ($count > 0) {
- $fieldname .= "." . array_shift($stringParts);
- if (array_key_exists($fieldname, $parentResult) && is_array($parentResult[$fieldname])) {
- $arrayLocation = $parentResult[$fieldname];
- foreach ($stringParts as $key => $innerValue) {
- $arrayLocation = CRM_Utils_Array::value($innerValue, $arrayLocation);
- }
- $params[$field] = $arrayLocation;
- }
- $count = count($stringParts);
+ $fieldname = array_shift($stringParts);
+
+ //when our string is an array we will treat it as an array from that . onwards
+ $count = count($stringParts);
+ while ($count > 0) {
+ $fieldname .= "." . array_shift($stringParts);
+ if (array_key_exists($fieldname, $parentResult) && is_array($parentResult[$fieldname])) {
+ $arrayLocation = $parentResult[$fieldname];
+ foreach ($stringParts as $key => $innerValue) {
+ $arrayLocation = CRM_Utils_Array::value($innerValue, $arrayLocation);