URGENTE: que hago mal, que puede fallar?
tengo un problema al "pasar" el siguiente script:
<?
if (isset ($HTTP_GET_VARS[id])) {
$var = $HTTP_GET_VARS[id];
}
else {
$var = "0002";
}
$item = substr($var,2,2);
settype($item, "string");
print ("$item"."<br>");
if ($item = ("01")) {
print ("normal"); }
elseif ($item = ("02")) {
print ("news"); }
else {
print ("Pagina no encontrada");
}
?>
me escribe el "02" pero no consigo que funcione el "if" y me escriba "news", alguien me puede ayudar, que puedo estar haciendo mal?
gracias "in advance"
<?
if (isset ($HTTP_GET_VARS[id])) {
$var = $HTTP_GET_VARS[id];
}
else {
$var = "0002";
}
$item = substr($var,2,2);
settype($item, "string");
print ("$item"."<br>");
if ($item = ("01")) {
print ("normal"); }
elseif ($item = ("02")) {
print ("news"); }
else {
print ("Pagina no encontrada");
}
?>
me escribe el "02" pero no consigo que funcione el "if" y me escriba "news", alguien me puede ayudar, que puedo estar haciendo mal?
gracias "in advance"