while循环preg_match

I want to loop:

$embed = array();
preg_match('@<embed.*?</embed>@s', $text, $embed);

How do I loop the $embed?

Thanks!

How do you make a loop? Well, there are several ways...

#1...
foreach ($embed as $e) {
    #do stuff with $e as the current item
}

#2...
$len = count($embed);
for ($i = 0; $i < $len; $i++) {
    #do stuff with $embed[$i] as the current item
}
#or, with a while loop
#3...
while ($len--) {
    #do stuff with $embed[$i] as the current item
}
foreach( $embed as $match ){}

Or is this a trick question?