Hi Friends,
I am new for PHP, and if there is any mistake please excuse me.
What i wont here is to get some data from a Database table and pass it to an array(multiple).
$sql .= "SELECT ID,Name FROM refer_table order by id";
$result = mysql_query($sql) or die ('amtr select failed: ' . mysql_error());
$status_count = mysql_num_rows($result);
$array_v = "";
$count = 0;
while ($myrow = mysql_fetch_array($result))
{
$id = $myrow['ID'];
$array_v .= $id.'=>"'.$myrow['Name'].'",';
}
$array_v .= '99999=>"End"';
$arr = array("101" => array($array_v));
echo "<br> 00000 ".$arr["101"][0];
here i am getting the expected result for the veriable $array_v
$array_v=1=>"one",2=>"two",3=>"three",99999=>"End"
array("101" => array($array_v));
but the below echo display all the $array_v output
echo "<br> 00000 ".$arr["101"][0];
---------- 1=>"one",2=>"two",3=>"three",99999=>"End"
but here i want the output as
$arr["101"][0]; // (blank)
$arr["101"][1]; // one
$arr["101"][2]; // two
$arr["101"][3]; // three
Looking 4 your valuable comment\s and suggestions.