I want to implode the multi array inside the for loop.
$_POST['PprodName'];
In this $_POST['PprodName'] I have got a value as:
Array ( [0] => steel mj23 [1] => [2] => [3] => [4] => [5] => [6] => [7] => )
steel mj23 is my first product name.
Now I want to check if the element is empty according to their position. so I applied a for loop but don't know how to implode element's which are not empty.
I want to implode only those element which are not empty.
Here is my for loop.
for( $i=0; $i < count($_POST['PprodName']); $i++ ) {
if( !empty( $_POST['PprodName'][$i] ) ) {
print_r($_POST['PprodName'][$i]);
}
}