Right I've got a foreach loop displaying some results of some crazy ass db queries. All working fine...
Code:
asort($order)
foreach ($order as $id => $created) {
printf('<a href="%s/%2$s.html">%s</a>', $names[$id]['table'], $names[$id]['name']);
}
I need to limit the results though so tried this instead
Code:
asort($order)
for ($i = 0; $i < 10; ++$i) {
$id = $order[$i];
printf('<a href="%s/%2$s.html">%s</a>', $names[$id]['table'], $names[$id]['name']);
}
It doesn't work. Anyone know why?
__________________That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.