I currently have an array as follows:
Array (
[0] => Array ( [id] => 34 [another_id] => 2805 [third_id] => 1 )
[1] => Array ( [id] => 35 [another_id] => 2805 [third_id] => 1 )
[2] => Array ( [id] => 36 [another_id] => 2805 [third_id] => 1 )
[3] => Array ( [id] => 37 [another_id] => 2805 [third_id] => 1 )
[4] => Array ( [id] => 38 [another_id] => 2805 [third_id] => 1 )
[5] => Array ( [id] => 39 [another_id] => 2805 [third_id] => 1 )
[6] => Array ( [id] => 40 [another_id] => 2805 [third_id] => 2 )
[7] => Array ( [id] => 41 [another_id] => 2805 [third_id] => 2 )
[8] => Array ( [id] => 42 [another_id] => 2805 [third_id] => 2 )
[9] => Array ( [id] => 43 [another_id] => 2805 [third_id] => 2 )
)
What I need to do is ultimately print out 9 links ( as there are 9 array elements) but based on the keys in the array. For example:
www.samplelink/link/id/another_id/third_id
But I can't seem to get the loop right. What I have so far is:
foreach ($array as $arr) {
foreach ( $arr as $key => $value ) {
echo "<a>www.samplelink/link/".$key[$value]."</a>";
}
}
But thats not exactly what I need as its printing out the keys as well. Anyone know what I could do?