I got an array implode variable, $varString, that is setup to return 3 separate values listed below depending on the condition.
- 1
- 2
- 1,2
If ($varString == 1)
{
echo 'APPLE';}
ElseIf ($varString == 2)
{
echo 'BANANA';}
ElseIf ($varString == 1,2) //throws an error.
{
echo 'APPLE and BANANA';}
How do I do this for the case of 1,2?
I tried
ElseIf ($varString == '1,2') //throws an error.
{
echo 'APPLE and BANANA';}
ElseIf ($varString == "1,2") //throws an error.
{
echo 'APPLE and BANANA';}