troubleshooting Question

Filtering a multi-dimensional Array in PHP

Avatar of dogsareit
dogsareitFlag for United States of America asked on
PHP
2 Comments1 Solution9 ViewsLast Modified:
I have a multi-dimensional array that always contains one completely blank row.
How do I remove this one blank row?  The individual elements may or may not be blank.
If they all are blank (or null ?) then I want to get rid of that row.
 I have used array_filter on a one dimensional array,
but never for a  multi-dimensional array. I am not sure why I have a blank row, I check where and when I increment my index, and I think I am good.
Below are the two errors I receive
Notice: Uninitialized string offset

 Illegal string offset :
And this is the structure of my array:
$_SESSION['GlobalRegionIndex'] = 0;

$_SESSION['GlobalRegionArray'] = array();
$_SESSION['GlobalRegionArray'] = array(
                   'strRegionFile' => '',
         'strRegionFileName' => '',
         'strRegionProdLocation' => '',
         'strRegionAwsLocation' => '',
         'strRegionSupplierCode' => '',
         'strRegionConfNbr' => '',
         'strRegionStatus' =>'');
Any help/explanation is appreciated. Thank you in advance.
ASKER CERTIFIED SOLUTION
dogsareit
Owner

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros