Hi,
This is my second day in PHP.
I want to creat a two dimensional array and populate it on run with the results of query.. something like this...
------Code Start-------
require("ConnectToDataBase.php");
$query ="select * from MinorSkillMaster";
$result =mysql_query($query);
$row =mysql_fetch_row($result);
$b= $row[0];
$a = $row[2];
if ($a == ""):
echo "Fill Up Database, buddy...";
else:
$my_array = array ( array ($b,$a) );
echo $my_array[0][1];//this is giving o/p
$i=1;
$j=0;
while($row = mysql_fetch_array($result))
{ $my_array[j]=$row[0];
$j=1;
$my_array[j]=$row[2];
$i=$i+1;
$j=0;
}
endif;
echo $my_array[1][0];//this is not giving o/p
echo $my_array[1][1];//this is not giving o/p
Will the reader take out his precious time and help me out,pls.
Raghu
"New Kid on PHP horizon"