- 16, May 2024
- #1
Как объединить $showstrongs, $showstrongs2 и $showstrongs3 в массив $total_etymologyStrongs?
<?php
set_time_limit(90);
$string1 = "";
$string2 = "";
$string1 .= "-----<br /><br />\n";
$string1 .= "stripatag <pre style=\"color: red; font-weight: bold;\">";
$string2 .= "</pre> ";
$string2 .= "<br /><br />\n";
$all_etymologyStrongs = array();
$all_description_blb = array();
$blbdescription = "<span style=\"color: red; font-weight: bold;\"> The same as <a class=\"nowrap\" href=\"lexicon.cfm?strongs=H9&t=KJV\" title=\"English: lost thing, that which was lost\"><span class=\"Hb\">אֲבֵדָה</span> (H9)</a>, incorrectly written for <a class=\"nowrap\" href=\"lexicon.cfm?strongs=H11&t=KJV\" title=\"English: destruction\"><span class=\"Hb\">אֲבַדּוֹן</span> (H11)</a> </span>";
//'/\([H|G]{1}([0-9]+)\)/'
preg_match_all('/\(([H|G]{1}[0-9]+)\)/', $blbdescription, $showstrongs, PREG_SET_ORDER);
array_push($all_description_blb, $blbdescription);
array_push($all_etymologyStrongs, $showstrongs);
$total_description = array();
$total_etymologyStrongs = array();
$total_etym_desc = array();
for($a=0;$a<count($showstrongs);$a++){
$all_etymologyStrongs = array();
$all_description_blb = array();
$file_link = "[URL='https://lumtu.com/yti/cwZZwcz1odHRwczovL2JsdWVsZXR0ZXJiaWJsZS5vcmcvbGFuZy9sZXhpY29uL2xleGljb24uY2ZtP1N0cm9umc0']https://www.blueletterbible.org/lang/lexicon/lexicon.cfm?Strongs=".$showstrongs[$a][1]."&t=KJV[/URL]";
$file = file_get_contents($file_link);
preg_match_all("#<\b(div)\b[^>]*>(.*?)</\b(div)\b>#si", $file, $divout, PREG_SET_ORDER);
$blbdescription = $divout[78][2];
preg_match_all('/\(([H|G]{1}[0-9]+)\)/', $blbdescription, $showstrongs2, PREG_SET_ORDER);
array_push($all_description_blb, $blbdescription);
array_push($all_etymologyStrongs, $showstrongs2);
for($b=0;$b<count($showstrongs2);$b++){
$file_link2 = "[URL='https://lumtu.com/yti/cwZZwcz1odHRwczovL2JsdWVsZXR0ZXJiaWJsZS5vcmcvbGFuZy9sZXhpY29uL2xleGljb24uY2ZtP1N0cm9umc0']https://www.blueletterbible.org/lang/lexicon/lexicon.cfm?Strongs=".$showstrongs2[$b][1]."&t=KJV[/URL]";
$file2 = file_get_contents($file_link2);
preg_match_all("#<\b(div)\b[^>]*>(.*?)</\b(div)\b>#si", $file2, $divout, PREG_SET_ORDER);
$blbdescription = $divout[78][2];
preg_match_all('/\(([H|G]{1}[0-9]+)\)/', $blbdescription, $showstrongs3, PREG_SET_ORDER);
array_push($all_description_blb, $blbdescription);
array_push($all_etymologyStrongs, $showstrongs3);
}
}
$all_description_blb = array_values(array_unique($all_description_blb));
$string_description_blb = addslashes(implode("|", $all_description_blb));
array_push($total_etymologyStrongs, array_unique($all_etymologyStrongs));//implode("|", )
array_push($total_etym_desc, $string_description_blb);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL='https://lumtu.com/yti/dk55kdGRodHRwOi8vdzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25hbCh52']http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL='https://lumtu.com/yti/b0hh0bWxodHRwOi8vdzMub3JnLzE5OTkveGvkT']http://www.w3.org/1999/xhtml[/URL]">
<head>
<meta http-equiv="Content-Type" content="текст/html; кодировка = utf-8" />
<title>Test: Strip a Tag 3</title>
</head>
<body>
<?php
echo $string1;
var_dump($showstrongs);
echo $string2;
echo $string1;
var_dump($total_etymologyStrongs);
echo $string2;
?>
</body>
</html>
PHP: