is this global variables? PHP

gammaraptorr

New Member
i dont know what is the name of this line of code.. and i don't even know if im doing the right structure of code.. i can't research to google because i don't know what to search.. :)anyway, here's the code..\[code\]<?php$hello = 1;switch($hello){ case 1: FOO: break; case 2: BAR: break;}FOO:echo "hello world!";BAR:echo "hola world!";?>\[/code\]if the value of $hello == 1, does the output will be "hello world!"?if the value of $hello == 2, does the output will be "hola world!"?i got this to work..\[code\]<?php$hello = '1';switch($hello){ case '1': goto FOOO; break; case '2': goto BARR; break;}FOOO:echo "hello world!";goto LAST;BARR:echo "hola world!";LAST:?>\[/code\]thanks for the suggestions and answers.. :)
 
Back
Top