Got this array:
$a = array("", "DPKA-18PG-7", "", "NS", 10, "Connector", "", "", "", "", "");
If I do this:
array_shift($fields_order); // remove the first element
array_pop($fields_order); // remove the last 4 elements
array_pop($fields_order);
array_pop($fields_order);
array_pop($fields_order);
I should get this:
array("DPKA-18PG-7", "", "NS", 10, "Connector");
But, instead, I'm getting this:
Array ("DPKA-18PG-7", "", "NS", 10, "Connector", "");
But, if I add another array_pop, which should remove the last empty element,
I get this result:
Array ("DPKA-18PG-7", "", "NS", 10);