Q:

ECHO COLUMN VALUE FROM 3RD UP TO THE LAST PHP

i want to echo 3rd column's value up to the last column
i know i can do this by echo $result[3]; echo $result[4]; echo $result[5]; and so on up to the last but is there any way to do it this way echo $result[3] UNTIL $result[last]; ? 
please help me
thanks in advance

A:

You need to return numeric indices from DB query and simple for loop.  Notice the MYSQL_NUM flag added:
while($result=mysql_fetch_array($query, MYSQL_NUM)) {
    for ($index = 3; $index < count($result); $index++) {
       echo $result[$index];
    }
}

EDIT:
An alternative.  Use mysql_fetch_assoc and access your data using column names instead of numeric indices.  This improves readablity of code as well. 
while ($row = mysql_fetch_assoc($result)) {
    echo $row["userid"];
    echo $row["fullname"];
    echo $row["userstatus"];
}

mysql_free_result($result);

