이 문장을 switch 문으로 바꾸려면 어떻게..?
글쓴이: kurtof27 / 작성시간: 목, 2004/05/20 - 4:01오후
if (strstr("$code","seoul")){$location='서울';} else echo "";
if (strstr("$code","gyeonggi")){$location='경기';} else echo "";
if (strstr("$code","kangneung")){$location='강릉';} else echo "";
if (strstr("$code","gwangju")){$location='광주';} else echo "";
if (strstr("$code","gunsan")){$location='군산';} else echo "";
if (strstr("$code","daegu")){$location='대구';} else echo "";
if (strstr("$code","daejeon")){$location='대전';} else echo "";
위구문을 switch 문으로 변환하려하는데 도저히 모르겠네요..
제발 알려주세요.
Forums:
just google. http://www.linuxlab.co.
just google.
http://www.linuxlab.co.kr/docs/10-4.htm
find `switch`
http://www.linuxlab.co.kr/docs/1999-1.htm
셸 부분만 일독을 권해드려요~
이건 php로 하려는 건데 먼가 오해가..
이건 php로 하려는 건데 먼가 오해가..
댓글 달기