I have the following array in PHP, which I'm pulling from a JSON file. I've tried carrying out a foreach to fetch only the supplier names, but to no avail.
Ideally, I'd like to just return CB DESIGN and DESIGN COMPANY but any time I've tried this, it either returns the following:
array(4322)
[0]=> array(1) {["supplier"]=> array(0) { }}
[1]=> array(1) {["supplier"]=> array(0) { }}
[2]=> array(1) {["supplier"]=> array(0) { }}
[3]=> array(1) {["supplier"]=> array(1) {[0]=> string(29) " CB DESIGN "}}
[4]=> array(1) {["supplier"]=> array(1) {[0]=> string(19) " DESIGN COMPANY "}}
I only want to return the company names, is there any way to strip out the empty elements, I've tried using array_filter but it keeps returning the same, as above.
Any help would be greatly appreciated.
Many thanks!