simonpearce
ISP
Hi! I'm passing some information through a browser to a .php page but this is causing me a nuisance.
The code below ALWAYS outputs "apple" no matter what $prefix is.
Why doesn't this work:
<?php
if ($prefix = "apple") {
echo "apple";
} elseif ($prefix = "banana") {
echo "banana";
}
?>
Many thanks
Simon
The code below ALWAYS outputs "apple" no matter what $prefix is.
Why doesn't this work:
<?php
if ($prefix = "apple") {
echo "apple";
} elseif ($prefix = "banana") {
echo "banana";
}
?>
Many thanks
Simon