Searching myLv loadvars array

I currently use PHP to bring in variables to Flash. Each variable has a number added to the end of a variable name with a PHP loop. There is then a loop in flash that cycles through each variable and displays it in flash. Heres the loop:


while (x<myLv.n) {
new_mc = container.attachMovie("grid_item", "mc_"+x, x);
new_mc.id = myLv["id"+(x)];
new_mc.price.text = myLv["price"+(x)];
new_mc.movnum = x;
}

So now I have movieclips with two variables attached - one is ID which is the unique ID coming in from the mysql database this never changes - and movnum which is just the number that refers to the variable number stored in the myLv array.

My question is this, sometimes the myLv variables reload and the associated movnum variable x changes. But if I then want to find the same movie knowing the unqiue ID that hasn’t changed - how do I find the new value of x?

Hope this makes sense!!!