변수값 질문..? 정보
변수값 질문..?
본문
안녕하세요.
그누보드 변수값 질문드립니다..
$g4[path] 와 $g4['path']
의 쿼테이션 차이점이 먼가요?
config파일엔 쿼테이션 마크가있는데 일반적 bbs파일들엔 대부분 쿼테이션이 붙질 않네요..
그리고 $g4[path] 를 $g4_path 씩으로 안쓰고 왜 괄호를 치는지?.. 배열인것같은데..
알려주세요.!.^^
그누보드 변수값 질문드립니다..
$g4[path] 와 $g4['path']
의 쿼테이션 차이점이 먼가요?
config파일엔 쿼테이션 마크가있는데 일반적 bbs파일들엔 대부분 쿼테이션이 붙질 않네요..
그리고 $g4[path] 를 $g4_path 씩으로 안쓰고 왜 괄호를 치는지?.. 배열인것같은데..
알려주세요.!.^^
댓글 전체

http://www.php.net/manual/kr/language.types.array.php
좀 보다 보면 이런 내용이 있어요.
Array do's and don'ts
Why is $foo[bar] wrong?
Always use quotes around a string literal array index. For example, $foo['bar'] is correct, while $foo[bar] is not. But why? It is common to encounter this kind of syntax in old scripts:
좀 보다 보면 이런 내용이 있어요.
Array do's and don'ts
Why is $foo[bar] wrong?
Always use quotes around a string literal array index. For example, $foo['bar'] is correct, while $foo[bar] is not. But why? It is common to encounter this kind of syntax in old scripts: