Shortcut? :P

Maybe array with for loop? just practicing.

function foo() {
	$int = "SELECT * FROM table ORDER BY id ASC";
	$intQ= mysql_query($int);
	$intf= mysql_fetch_array($intQ);
	echo "one : " . $intf[0] . "<br />";
	echo "two : " . $intf[1] . "<br />";
	echo "three : " . $intf[2] . "<br />";
	echo "four : " . $intf[3] . "<br />";
	echo "five : " . $intf[4] . "<br />";
	echo "six : " . $intf[5] . "<br />";
	echo "seven : " . $intf[6] . "<br />";
	echo "eight : " . $intf[7] . "<br />";
}

Maybe with while? Maybe with… foreach? :slight_smile:

Thanks for the very usefull information… : ) i was actually hoping for a code that can go as an array / loop or anything that can sum this huge block of code to something better

There is a function that converts numbers to words, over at: http://www.phpro.org/examples/Convert-Numbers-to-Words.html

Then all you need to do is to use a for loop to loop through the array, and pass the index number (plus one) over to that convert_number function.