開始行: ***そういえば [#t13ebbcd] 土曜日に、tableデータの処理をするときのプログラムを作っ... //cut ~ そして下記のようなものを作ってみたのだが… #geshi{{{ $count = count($line_data); $option_c = ($option_a && !isset($option_b))? array_fill(... if ( strpos($option_b, ',') === FALSE ) { $option_c[$option_b] = 1; } else { $m =explode(',', $option_b); foreach ($m as $m_line) { $option_c[$m_line] = 1; } } for ( $x = 0 ;$x <= $count ; $x++){ if ( $option_c[$x] ) 処理($line_data[$x]); } }}} そういえば以前にも似たようなものを作ったと思い出して調... #geshi{{{ $all = (isset($option_a) && !isset($option_b)) ? 1 : 0; $count = count($line_data); if ( strpos($option_b, ',') === FALSE ) { $option_c[] = $option_b; } else { $option_c =explode(',', $option_b); } for ( $x = 0 ;$x <= $count ; $x++){ if ( array_search($x, $option_c) !== false || $all) 処理($line_data[$x]); } }}} ~ (; ゚ Д ゚) #geshi{{{ for ( $x = 0 ;$x <= $count ; $x++){ if ( in_array($x, $option_c) || $all) 処理($line_data[$x]); } }}} こうするべきだね…orz 終了行: ***そういえば [#t13ebbcd] 土曜日に、tableデータの処理をするときのプログラムを作っ... //cut ~ そして下記のようなものを作ってみたのだが… #geshi{{{ $count = count($line_data); $option_c = ($option_a && !isset($option_b))? array_fill(... if ( strpos($option_b, ',') === FALSE ) { $option_c[$option_b] = 1; } else { $m =explode(',', $option_b); foreach ($m as $m_line) { $option_c[$m_line] = 1; } } for ( $x = 0 ;$x <= $count ; $x++){ if ( $option_c[$x] ) 処理($line_data[$x]); } }}} そういえば以前にも似たようなものを作ったと思い出して調... #geshi{{{ $all = (isset($option_a) && !isset($option_b)) ? 1 : 0; $count = count($line_data); if ( strpos($option_b, ',') === FALSE ) { $option_c[] = $option_b; } else { $option_c =explode(',', $option_b); } for ( $x = 0 ;$x <= $count ; $x++){ if ( array_search($x, $option_c) !== false || $all) 処理($line_data[$x]); } }}} ~ (; ゚ Д ゚) #geshi{{{ for ( $x = 0 ;$x <= $count ; $x++){ if ( in_array($x, $option_c) || $all) 処理($line_data[$x]); } }}} こうするべきだね…orz ページ名: