해결 어려울거 같은데 그래도 질문드려 봅니다. 채택완료
$wra_start= 71; $h=0;
for($k=11; $k<=67; $k+=4){ $h++; $hs=sprintf("%02d", $h);
$wr11 = 'wr_'.$k; $wr71 = 'wr_'.$wra_start;
$wr12 = 'wr_'.($k+1); $wr74 = 'wr_'.($wra_start+3);
$wr13 = 'wr_'.($k+2); $wr73 = 'wr_'.($wra_start+2);
$wr14 = 'wr_'.($k+3); $wr72 = 'wr_'.($wra_start+1);
$wra_start+=7;
?>
} ?>
인풋이 가로로 4개씩 15줄이 생기는 겁니다.
그런데 여기에 wr151을 분할필드로 넣어서
1줄에 <wr_151[0]>
2줄에 <wr_151[1]>
..
15줄에 <wr_151[14]>
이런식으로
wr_151[0]~ wr_151[14]까지 넣고 싶은데 혹시 아시면 좀 알려주세요..
답변 4개
왜 안되나요???
</p><pre style="line-height: normal;"><?php
$wra_start = 71;
$h = 0;
for ($k = 11; $k <= 67; $k += 4) {
$hs=sprintf("%02d", $h);
$wr11 = 'wr_'.$k; $wr71 = 'wr_'.$wra_start;
$wr12 = 'wr_'.($k+1); $wr74 = 'wr_'.($wra_start+3);
$wr13 = 'wr_'.($k+2); $wr73 = 'wr_'.($wra_start+2);
$wr14 = 'wr_'.($k+3); $wr72 = 'wr_'.($wra_start+1);
$wra_start+=7;
?>
<input > <input> <input> <input> <span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; line-height: 22px; white-space: normal; background-color: rgb(247, 247, 247);"><input type="text" name="wr151[<?php echo $h;?>]" value="<?php echo $wr151[$h];?>"></span>
<?php </pre><pre style="line-height: normal;"> $h++;</pre><pre style="line-height: normal;">} ?></pre><pre style="line-height: normal;">
답변에 대한 댓글 2개
<input type="text" name="wr151[1]" value=""> 요소검사해보니 이렇게 밸류값이 안나타나거든요.
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
결과물은 letsgolee 님과 같습니다.
</p><p> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span style="font-size: 11pt; line-height: 1.5;"><?</span> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wra_start= 71; $h=0;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">for($k=11; $k<=67; $k+=4){ $h++; $hs=sprintf("%02d", $h);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$wr11 = 'wr_'.$k; $wr71 = 'wr_'.$wra_start; </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$wr12 = 'wr_'.($k+1); $wr74 = 'wr_'.($wra_start+3);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$wr13 = 'wr_'.($k+2); $wr73 = 'wr_'.($wra_start+2);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>$wr14 = 'wr_'.($k+3); $wr72 = 'wr_'.($wra_start+1);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wra_start+=7;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><input > <input> <input> <input> <?php echo wr_151[($k-11)%4] ?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">// 11을 빼고 4로 나눕니다.</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><? } ?></p><p> </p><p>
답변에 대한 댓글 2개
<input type="text" name="~
감사합니다x3
댓글을 작성하려면 로그인이 필요합니다.
이런거요??? $wr_151이 배열로 있다고 가정하고...
</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span style="font-size: 11pt; line-height: 1.5;"><?php</span></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">$wra_start = 71;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">$h = 0;</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">for ($k = 11; $k <= 67; $k += 4) { </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span style="font-size: 14.004px; line-height: 25.2072px;"> $hs=sprintf("%02d", $h);</span></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wr11 = 'wr_'.$k; $wr71 = 'wr_'.$wra_start; </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wr12 = 'wr_'.($k+1); $wr74 = 'wr_'.($wra_start+3);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wr13 = 'wr_'.($k+2); $wr73 = 'wr_'.($wra_start+2);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> $wr14 = 'wr_'.($k+3); $wr72 = 'wr_'.($wra_start+1);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><span style="font-size: 14.004px; line-height: 25.2072px;"> $wra_start+=7;</span></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><input > <input> <input> <input> <?php echo $wr_151[$h++];?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;"><?php } ?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; line-height: 25.2072px;">
답변에 대한 댓글 1개
알려주신 위치에 인풋을 넣으면 1행씩 인풋이 나오는데
<input type="text" name="wr151[1]" value='<?php echo $wr151[1]?>'> 이렇게 넣을때
[1]부분이 1~15까지 자동으로 증가 되어야 하는데 안되어서요,,
이렇게 하려면 name과 value를 어떻게 넣어줘야 하는지 몰라서..
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
원하는대로 깔끔하게 되었습니다.
진심으로 감사드려요,
어찌 이런거 까지 다 아시는지 존경스럽니다. 감사합니다. 끄벅