2008/7/23 Marco Branco > hi > > i have this link in a web page (www.mydomain.com/index.php?id=2). > > and in the index.php i have > > <?php > (...) > switch ($id) > { > case 1: echo('um - 1'); break; > case 2: echo('dois - 2'); break; > case 3: echo('tres - 3'); break; > default: echo('defaulf - any'); > } > (...) > ?> > > I alwys get the last line of the switch: *default - any* > > Why? > > thank's in advance > ------------------------ since its not the whole code its hard to tell but i would echo $id and check the contents of the varible, that would explain why its is going wrong.
Andy