Split function no longer working

More
1 year 2 months ago #4297 by postkat
First: when you disable the contact form, don't show it!

Since the last update of datafeeds I cannot get it to work anymore.
I always used:
Code:
function vivara1_cb(&$item) { generic_cb($item); if(isset($item['menu_1'])) {$split = explode('>',$item['menu_1'],4); if(count($split) == 4){$split = explode('>',$item['menu_1'],4); {list($item['menu_1'],$item['menu_2'],$item['menu_3'],$item['menu_4'])=$split;} } if(count($split) == 3){$split = explode('>',$item['menu_1'],3); {list($item['menu_1'],$item['menu_2'],$item['menu_3'])=$split;} } if(count($split) == 2){$split = explode('>',$item['menu_1'],2); {list($item['menu_1'],$item['menu_2'])=$split;} } } }

But this does no longer work.
Help please!

Regards,
Dorine Post

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago - 1 year 2 months ago #4298 by bram
Summary from the emails:
 
Code:
 if(isset($item['field1'])) {         $split = explode('>', $item['field1']);         $item['field4']=$split[3]??'';          $item['field3']=isset($split[2])?$split[2]:''; // is hetzelfde als de ??         if ( isset($split[1]) ) { // is hetzelfde als de ?? en de ? :                 $item['field2']= $split[1];         }  else {                 $item['field2']= ''; // kan ook wegblijven         }         $item['field1']=$split[0]??'';     }
Last edit: 1 year 2 months ago by bram.

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds