Depending on your interpretation, it might be correct to run multiple queries in a loop. However, for optimal performance, it is best to reduce the queries to a minimal number of queries.
One way this can be done with your example is to use a CASE statement. See this article for more information, and the example below, based on your sample code.
Also, while this isn't codereview.stackexchange.com, it is recommended that you prepare statements and bind parameters instead of placing values inline, so as to avoid the possibility of a SQL injection attack. See this answer where parameters are bound for the INSERT statement.
$cases = array();
$whereConditions = array();
foreach($array as $values){
$cases[] = 'WHEN `id` = '.$values['user'].' THEN \''.$values['name'].'\'';
$whereConditions[] = '`id` = \''.$values['user'].'\'';
}
$MySQL_string = "UPDATE `MyGuests` SET `firstname` = CASE ".implode(' ',$cases)." END WHERE ".implode(' OR ',$whereConditions);
$DB->mysqli->query($MySQL_string);