I am using array_diff to remove an item from an array... It works at removing 'field_home_slider', but the final print render() is outputting like 15 times. Am I missing something as to why the print would do that?
Can this be written a cleaner way? I want item 'field_home_slider' removed from $page['content'];
$array_remove = array_diff($page['content'], array('field_home_slider'));
print render($array_remove);
Original code
print render($page['content']);
$page['content']out puts all the content without anything being removed. I am usingarray_diffto filter it and remove item "field_home_slider". now when i out put$array_removeit is reprinting everything multiple times instead of just once.