내 다른 경우 나는 라이센스가 유효하지 않은 경우 난 단지 라이센스 탭을 표시하고자이다차원 PHP 배열
'sections' => array(
array(
'title' => 'License',
'id' => 'license'
),
array(
'title' => 'General',
'id' => 'general'
),
array(
'title' => 'Header',
'id' => 'header'
),
array(
'title' => 'Footer',
'id' => 'footer'
),
array(
'title' => 'Slider',
'id' => 'slider'
),
)
같은 배열을 가지고있다. 그래서 나는 누군가가 나에게 그것을 사용하기에 적합한 방법을 말할 수이
'sections' => array(
array(
'title' => 'License',
'id' => 'license'
),
if ($license_valid) {
array(
'title' => 'General',
'id' => 'general'
),
array(
'title' => 'Header',
'id' => 'header'
),
array(
'title' => 'Footer',
'id' => 'footer'
),
array(
'title' => 'Slider',
'id' => 'slider'
),
}
)
처럼 배열 뭔가 내 경우 다른 문을 사용 하시겠습니까?
유 사용할 수있는 유일한 방법은 [속기 경우 (http://davidwalsh.name/php-은 ternary-examples) – DarkBee