Hello,
I am querying a MySQL database and storing the results in an array using the following method:
$resource = mysql_query("select * from tImages where imgCategory = '" . $category . "' ORDER BY imgTitle ASC");
$row = mysql_fetch_assoc($resource);
I'd like to be able to find out which index/row (not sure of the terminology in this case) a particular value falls on.
The table has a column called "imgID", I want to find the "index/key/row" that my variable $imgid matches up on in these results. If that is not possible, I'd like to implement a counter that will count until this value is found in the results. This count / value is needed for later operations in my application.
Any help would be appreciated, let me know if you need further clarification.
-Mike