- $title = "";
-
- foreach ($enclosure->attributes AS $attributes) {
- if ($attributes->name == "url" || $attributes->name == "href") {
- $href = $attributes->textContent;
- } elseif ($attributes->name == "length") {
- $length = $attributes->textContent;
- } elseif ($attributes->name == "type") {
- $type = $attributes->textContent;
+
+ foreach ($enclosure->attributes AS $attribute) {
+ if (in_array($attribute->name, ["url", "href"])) {
+ $href = $attribute->textContent;
+ } elseif ($attribute->name == "length") {
+ $length = $attribute->textContent;
+ } elseif ($attribute->name == "type") {
+ $type = $attribute->textContent;