Hello all,

Having a problem with the behaviour of switch when mixing variable types. Eg

$page = 'review';
switch ($page) {
        case 0:
                echo "0";
        case 'review':
                echo "review";

this code interprets $page as 0 in the switch. It's not a problem to
alter 'review' to a number, just less elegant. Can anybody shed a
little light on mixed variable types in switch statements please?
While browsing the manual I noticed it performs "loose comparison" but
that seems to be the same as == ?

Many thanks,


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to