Method #2 is certainly *much* quicker and less taxing.
I will assume that $i is suppose to be incrementing. You may find the comments in the code below helpful.
PHP Code:
<?
// I assumed "Select *"
// Additionally, it would be quicker to ask for just the fields you
// need in the order you need them in.
$result=mysql_query("SELECT * FROM contacts WHERE field='$field'")
$i=0;
while($row=mysql_fetch_array($result)) {
// It isn't necessary to define each variable. Simply write the
// result set to your multidimensional array.
// Additionally I assume you are using mysql_fetch_array rather
// than fetch_row by the way you are referring to the vars.
$multi[$i][$row];
$i++;
}
// then a quicker loop would be:
for($ii = 0; $ii >= $i; $ii++) {
// Additionally you could nest a loop here.
print("$multi[$ii][fieldName]");
print("$multi[$ii][0]");
}
// to get a good look at your result set use the print_r command
print_r($multi);
?>