explode 함수로 나타난 배열을 다른 변수에 안담고 바로 나탈낼수 있는 방법이 있나요?
</strong><code class="plain" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"><td width=</code><code class="string" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">"22%"</code><code class="plain" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">> <?=</code><code class="functions" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; color: rgb(255, 20, 147) !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">explode</code><code class="plain" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">(</code><code class="string" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">";"</code><code class="plain" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">,</code><code class="variable" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; color: rgb(170, 119, 0) !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">$view</code><code class="plain" style="line-height: 13.1999998092651px; font-size: 12px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; min-height: inherit !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">[wr_shell]);?></td></code><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);">
$view[wr_shell]) 이라는 변수를
explode 통해서 배열로 나눠서 각각 저장 하게 되는데요
통상적으로 explode 하고 나면
$변수 = explode(";",$view[wr_shell]);
할텐데 $변수에 안담고
view페이지에서 바로 배열의 해당되는 저장된 값만 출력할수 없나요?
제가 고민한것은
<td width="22%"> <?=explode(";",$view[wr_shell])[0];?></td>
이렇게 해보았는데 당연 오류가 나오네요 ㅠ,ㅠ
무슨 방법이 없을까요?
답변 3개
$view[wr_shell] = "10;20;30;40";
echo pos(explode(";",$view[wr_shell]));
요 예제처럼 함수안에 안넣고는 방법이 없을거 같은데용. 걍 변수에 저장해놓고 쓰심이...
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인