I’m using preg_grep to make database queries per section, per example my database fields have footer_SOMETHING, footer_left, footer_middle and footer_right.
So my question is, having this:
preg_grep('/footer_left.*/', $colunas)
all my footer_left_** are included in my queries, but how do I do it to just return footer_ excluding left, middle or right?
example
footer_color
footer_left_border
footer_middle_width
footer_right_height
I just want to have
footer_color
Thanks in advance,
Pluda
If you want just
footer_colorand similar entries returned, then you can use a negative assertion to excludeleft,right,middlewith: