normal Split function no longer working

1 week 3 days ago #4297 by postkat
Split function no longer working was created 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:
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


  • Posts: 7
  • Thank you received:

  • Gender: Female
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    2 days 16 hours ago - 2 days 16 hours ago #4298 by bram
    Replied by bram on topic Split function no longer working
    Summary from the emails:
     
     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]??'';
    
        }
    


  • Posts: 1421
  • Thank you received: 234

  • Gender: Unknown
  • Birthdate: Unknown
  • Last edit: 2 days 16 hours ago by bram.

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

    Time to create page: 0.063 seconds