I have an array which looks like the following
array:7 [▼
0 => array:7 [▼
"id" => "62"
"name" => "creativeOption"
"label" => "Other"
"value" => "dfsdfsdfsdf"
"someId" => "14"
]
1 => array:7 [▼
"id" => "60"
"name" => "creativeOption"
"label" => "checkboxSelection"
"value" => "AnimSomething"
"someId" => "14"
]
2 => array:7 [▼
"id" => "61"
"name" => "creativeOption"
"label" => "checkboxSelection"
"value" => "Something"
"someId" => "14"
]
3 => array:7 [▼
"id" => "59"
"name" => "creativeNumber"
"label" => "Something"
"value" => ""
"someId" => "14"
]
4 => array:7 [▼
"id" => "57"
"name" => "creativeNumber"
"label" => "Something"
"value" => "Something 2 Info"
"someId" => "14"
]
]
I am interested in getting the value where the name is creativeOption. At the moment, I have this
foreach ($array as $data) {
foreach($data as $key => $value) {
if($value == 'creativeOption') {
}
}
}
So that allows me to find all the creativeOption, but how would I then go about getting their value?
creativeOptionis the value. What do you want to get?"value" => "blabla"