foreach ออกมาประกบกันค่าไม่ออก.. T^T

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: foreach ออกมาประกบกันค่าไม่ออก.. T^T

Re: foreach ออกมาประกบกันค่าไม่ออก.. T^T

by thatsawan » 20/10/2014 4:21 pm

Code: Select all

  print_r($row_tmp[$key_tmp]); echo '<br>'; 
Array ( [user_id] => 48 [user_posts] => 0 [user_warnings] => 0 [user_online_time] => 690 [user_regdate] => 4 )

Code: Select all

    print_r([$v_column]); echo '<br>';

Array ( [0] => posts )
Array ( [0] => days )
Array ( [0] => warnings )
Array ( [0] => user_online_time )

Code: Select all

   print_r($row_tmp[$key_tmp][$v_column].'>='.$value[$column_min_key]); echo '<br>';
                                                                        print_r($row_tmp[$key_tmp][$v_column].'<='.$value[$column_max_key]); echo '<br>'; 
>=0
<=0
>=100000
<=0
>=0
<=0
690>=0
690<=0
>=0
<=0
>=100000
<=0
>=0
<=0
690>=0
690<=0
>=0
<=0
>=100000

Re: foreach ออกมาประกบกันค่าไม่ออก.. T^T

by thatsawan » 20/10/2014 3:54 pm

print_r($row_tmp[$key_tmp][$v_column]); echo '<br>';
จะให้มัน ได้
0
4
0
690

เเต่ทำไม มันได้ 690

foreach ออกมาประกบกันค่าไม่ออก.. T^T

by thatsawan » 20/10/2014 3:39 pm

Code: Select all

 print_r($v_column); echo '<br>'; 
posts
days
warnings
user_online_time

Code: Select all

print_r($value_a); echo '<br>'; 
0
4
0
690

Code: Select all

 print_r($row_tmp);echo '<br>';
Array ( [48] => Array ( [user_id] => 48 [user_posts] => 0 [user_warnings] => 0 [user_online_time] => 690 [user_regdate] => 4 ) )


Code: Select all

 print_r($row_tmp[$key_tmp][$v_column]); echo '<br>';
690

690
**** ทำไม มันมา 690 ฟิลด์เดียว!!! ****

[code=php] foreach ($group_data as $key  => $value) {
                               // print_r($group_data);
                                foreach ($value as $data_groups) {
                                       // print_r($row_tmp);
                                        foreach ($row_tmp as $key_tmp => $value_tmp) {
                                                foreach ($value_tmp as $data_tmp) {
                                                        foreach ($check as $v_column => $value_a) {
//                                                     
                                                                $column_max_key = 'group_max_'.$v_column;
                                                                $column_min_key = 'group_min_'.$v_column;
                                                            
                                                                 print_r($row_tmp[$key_tmp][$v_column]); echo '<br>';
                                                               
                                                        }
                                                                 
                                                }          
                                        }
                                }    
                        } [/code]

Top