이게 잘못된건가요? ㅋ 정보
PHP 이게 잘못된건가요? ㅋ
본문
<?
$sql = "select * from $g4[board_table]";
$result=mysql_query($sql);
$fields=mysql_num_fields($result);
$sql = "select * from $g4[board_table]";
$result=mysql_query($sql);
$fields=mysql_num_fields($result);
while ($row=mysql_fetch_row($result))
{
for($i=0; $i < $fields; $i++){
if($i%$fields==21)
echo $row[$i];
}
}
?>
{
for($i=0; $i < $fields; $i++){
if($i%$fields==21)
echo $row[$i];
}
}
?>
분류명을 뽑을려고 이짓했는데용
if($i%$fields==21)
이렇게해서 뽑았거든용 ㅎㅎ....
이렇게해서 뽑았거든용 ㅎㅎ....
다른방법은 없나용?
제마음대로 뽑은거라 먼가 이상한거같아서용 ㅎㅎ
그리고 한가지만더 ㅠㅠ 분류 4개마다 한칸 뛰고싶은데 ㅠㅠ
어떻에 한방 먹여야 뛰어지는지 알면서도 어떻에사용해야될지 모르겠습니다 ㅠㅠ
추천
0
0
댓글 3개

mysql_fetch_row 대신 mysql_fetch_array 나 mysql_fetch_assoc 를 사용하시면 좀더 간단할듯..
<?
$sql = "select * from $g4[board_table]";
$result=mysql_query($sql);
while ($row=mysql_fetch_array($result))
{
echo $row['bo_category_list'];
}
?>
분류 4개마다 한칸 뛰는 것은, 무슨 뜻인지 잘 모르겠네요. ^^
<?
$sql = "select * from $g4[board_table]";
$result=mysql_query($sql);
while ($row=mysql_fetch_array($result))
{
echo $row['bo_category_list'];
}
?>
분류 4개마다 한칸 뛰는 것은, 무슨 뜻인지 잘 모르겠네요. ^^

음ㅠㅠ 죄송합니다. 댓글 남겨주셧는데 해결은 다했습니당 ㅠㅠ
네.잘하셨네요