I am having a problem with output of array using a for loop index. I am stumped. Don't believe it's a difficult task can someone help. My code is displayed below. var_dump results are showing at the bottom.

<ul>
<?php
// get companies

$companies_array = $hd->view_company($db);
//var_dump($companies_array);


$count = count($companies_array);
for($i = 0; $i < $count ; $i++) {

echo "<li><a href='company.php?company_id=".$company_id[$i]."'>".$company_name[$i]."</a></li>";
}
?>
</ul>

//var_dump($companies_array);
array(6) { [0]=> array(4) { [0]=> string(1) "1" ["company_id"]=> string(1) "1" [1]=> string(18) "hortondesign, inc." ["company_name"]=> string(18) "hortondesign, inc." } [1]=> array(4) { [0]=> string(1) "2" ["company_id"]=> string(1) "2" [1]=> string(17) "HEMCO Corporation" ["company_name"]=> string(17) "HEMCO Corporation" } [2]=> array(4) { [0]=> string(1) "3" ["company_id"]=> string(1) "3" [1]=> string(9) "VML, Inc." ["company_name"]=> string(9) "VML, Inc." } [3]=> array(4) { [0]=> string(1) "4" ["company_id"]=> string(1) "4" [1]=> string(21) "Plattform Advertising" ["company_name"]=> string(21) "Plattform Advertising" } [4]=> array(4) { [0]=> string(1) "5" ["company_id"]=> string(1) "5" [1]=> string(14) "Hantover, Inc." ["company_name"]=> string(14) "Hantover, Inc." } [5]=> array(4) { [0]=> string(1) "6" ["company_id"]=> string(1) "6" [1]=> string(13) "JUST Peanuts!" ["company_name"]=> string(13) "JUST Peanuts!" } }