Double Dimancinal Arrays in PHP

HI,

I am getting values from database and using DD arrays to show it…

here’s the code I am trying…and it pissed me off.


$sql="SELECT * FROM `tblbusinessinfo` WHERE `biz_id` = '$result[0]' or `biz_id` = '$result[1]' or `biz_id` = '$result[2]' or `biz_id` = '$result[3]' LIMIT 3";
        $result=mysql_query($sql);
        $total_records=mysql_num_rows($result);
        $sno_11 = 0;
        //$data1[][];
        while($row = mysql_fetch_array($result))
            {
            $sno_11++;
           
                for($k=0;$k<=1;$k++)
                {
                    for($j=0;$j<1;$j++)
                        {
                            $data1[$k][$j] = $row['biz_nam'];
                            print("<br>First Loop K:[" .$k. "]J[" .$j. "]");
                        }
                   
                    for($j=1;$j<2;$j++)
                        {
                            $data1[$k][$j] = $row['biz_person'];
                            //$data1[$k][$j] = $row['biz_phone'];
                            //$data1[$k][$j] = $row['biz_mobile'];
                            //$data1[$k][$j] = $row ['biz_addy1'] . $row ['biz_addy1'] . $row ['biz_addy1'] . $row ['biz_addy1'];
                            print("<br>Second Loop K:[" .$k. "]J[" .$j. "]");
                        }
                    for($j=2;$j<3;$j++)
                        {
                            $data1[$k][$j] = $row['biz_phone'];
                            //$data1[$k][$j] = $row['biz_mobile'];
                            //$data1[$k][$j] = $row ['biz_addy1'] . $row ['biz_addy1'] . $row ['biz_addy1'] . $row ['biz_addy1'];
                            print("<br>Third Loop K:[" .$k. "]J[" .$j. "]");
                        }
                }
            }

In results its showing same value 3 times…which should be change each time as per the while loop.

K and J Values0 0: Innovation Institute Of Business Studies
K and J Values0 1: Mr Priyanshu Singh (Md), Mr Tushar Chaudhary (Director)
K and J Values0 2: 4034001, 4034002

K and J Values1 0: Innovation Institute Of Business Studies
K and J Values1 1: Mr Priyanshu Singh (Md), Mr Tushar Chaudhary (Director)
K and J Values1 2: 4034001, 4034002

K and J Values2 0: Innovation Institute Of Business Studies
K and J Values2 1: Mr Priyanshu Singh (Md), Mr Tushar Chaudhary (Director)
K and J Values2 2: 4034001, 4034002

Thanks for your kind consideration.

You’ll have more luck if you actually ask a question.

All the times its showing just one single record on every location ARRAY

i hope, i make myself clearer now…