I just need someone to produce a small block of code for me. I am running a php website with MySQL database behind it. I know this is really simple - probably take a minute to write.
Basically i already have a variable ($X) which represents a text array of variable length.
e.g
Apple
Banana
Pear
Orange
I now need code that will query the array $X such that.
If Apple and Banana exist: $AB = yes
if Apple exists but Banana does not $A = yes
if Apple does not exist at all $A = no
If Apple, Banana and Orange exist $AB0 = yes
Basically i need to cover most cases..
But if you show me the code for the above, i am sure i can work out the rest.
First effcient and working code written to Message board will win.