We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb8c0c2 commit 8fbd122Copy full SHA for 8fbd122
berry/utils/HTMLHelper.php
@@ -17,13 +17,14 @@ public function __construct()
17
*/
18
public function GetAllTagsFromHTMLString(string $tag, string $html)
19
{
20
- $imgs = array();
21
- preg_match_all('/<' . $tag . '[^>]+>/i', $html, $result);
22
- for ($i = 0; $i < sizeof($result); $i++)
+ $images = array();
+ $regexResult = array();
+ preg_match_all('/<' . $tag . '[^>]+>/i', $html, $regexResult);
23
+ for ($i = 0; $i < sizeof($regexResult[0]); $i++)
24
- $imgs[$i] = $result[0][$i];
25
+ $images[$i] = $regexResult[0][$i];
26
}
- return $imgs;
27
+ return $images;
28
29
30
0 commit comments