Hi guys, I’m trying to filter an array which contains all of my POST values from a form that I have put into a session. Trying to filter out empty values but just returning the same values which are empty.
$details = array_filter($_SESSION['DETAILS']);
print_r($details);
See below of my output:
Array ( [ctitle] => Mrs [cfirstname] => Joe [clastname] => Bloggs [caddress] => 23 Joe Blogg Street, Devon [ccontactnumber] => 01234 039213 [cemail] => coxdabd@gmail.com [receiptno] => KK3 [delmethod] => NULL [products] => Array ( [0] => Array ( [name] => Test Product [serial] => 3929 [stock] => [quantity] => 1 [price] => 899 ) [1] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) [2] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) [3] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) [4] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) [5] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) [6] => Array ( [name] => [serial] => [stock] => [quantity] => [price] => ) ) [submit] => Submit )