thanks...
now this is wierd. both codes below are the same to me the first one works.. the second doesn't...
code 1 - this works - if you change $name...
##############################
<?
$name = "foo";
function checkTag($one, $two)
{
echo $one." is dufferent then ".$two;
}
switch ($name) {
case "don":
echo "mooo";
break;
default:
checkTag("uno", "dos");
break;
}
?>
######################################
code two - this doesn't work - the error i get is:
Cannot redeclare checktag() (previously declared......
here is the code:
<?
function startElement($parser, $name, $attrs) {
global $usless_tag, $open_tag, $tag;
if (!( (in_array($name, $usless_tag)) == 1) ) {
function checkTag($o_tag, $the_name) { // << this is the error line...
if ($format= $o_tag[$the_name]) {
echo $format;
}
}
switch ($name) {
case "HOTELID":
break;
default:
checkTag($open_tag, $name);
break;
}
}
$tag = $name;
}
?>
how are these 2 codes different?!
thanks...