You only need one function, run a join in your query
SELECT customer_id, name FROM customer_ids
INNER JOIN customers ON customer_ids.customer_identify = customers.identify
This should get the required fields then jun run your loop normally
0
solved mysql_fetch_array -> 2 mysql queries