PHP - check if one or more array field exist

soupporce

New Member
I have a array like this:\[code\]array('prefix1_field' => 34, 'prefix1_anotherfield' => 345, 'prefix1_andanotherfield' => 565, 'anotherprefix_field' => 34, 'anotherprefix_anotherfield' => 345, 'anotherprefix_andanotherfield' => 565, 'prefix3_anotherprefix_field' => 34, // <- 'anotherprefix' here should be ignored 'prefix3_anotherfield' => 345, 'prefix3_andanotherfield' => 565, ...);\[/code\]How can I make a function that checks if there are any fields in this array that start with \[code\]prefix1_\[/code\] for example?
 
Back
Top