Как взять вторую ссылку из строки?

  • Автор темы Алкексей
  • 12
  • Обновлено
  • 13, May 2024
  • #1
Как я могу взять и сохранить второй URL-адрес/ссылку в строке (предположим, $myUrl) из следующей строки?
 $myString = '<div class="thumbnail-container animate-lazy" style="padding-bottom:52.533%"><img width="750" height="394" src="[URL='https://lumtu.com/yti/bw55wbmdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3RoZW1lcy9qbmV3cy9hc3NldHMvaW1nL2plZy1lbXB0eS0BX']https://bbbbb.com/wp-content/themes/jnews/assets/img/jeg-empty.png[/URL]" class="attachment-jnews-featured-750 size-jnews-featured-750 lazyload wp-post-image" alt="Рон ДеСантис и протестующие" src="[URL='https://lumtu.com/yti/cgaagcGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTc1MHgzOTQuTOz']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-750x394.jpg[/URL]" data-sizes="auto" srcset="[URL='https://lumtu.com/yti/cgaagcGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTc1MHgzOTQuTOz']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-750x394.jpg[/URL] 750w, [URL='https://lumtu.com/yti/cgaagcGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTMwMHgxNTguTNx']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-300x158.jpg[/URL] 300w, [URL='https://lumtu.com/yti/commocGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTEwMjR4NTM4LMTN']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-1024x538.jpg[/URL] 1024w, [URL='https://lumtu.com/yti/cgaagcGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTc2OHg0MDMuDM0']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-768x403.jpg[/URL] 768w, [URL='https://lumtu.com/yti/commocGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zLTExNDB4NTk5LkTN']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3-1140x599.jpg[/URL] 1140w, [URL='https://lumtu.com/yti/commocGdodHRwczovL2JiYmJiLmNvbS93cC1jb250ZW50L3VwbG9hZHMvMjAyMC8xMC9ORi0xMDAxMjAyMC0zL0CM']https://bbbbb.com/wp-content/uploads/2020/10/NF-10012020-3.jpg[/URL] 1200w" data-expand="700" /></div>';
Код (разметка):

Алкексей


Рег
01 Sep, 2015

Тем
1

Постов
2

Баллов
12
Тем
49554
Комментарии
57426
Опыт
552966