返回 span PlainText 的 SimpleHtmlDom 未作为字符串处理

simplehtmldom returning span plaintext is not handled as string

提问人:Gacha SS 提问时间:9/22/2023 更新时间:9/22/2023 访问量:8

问:

我使用此代码从跨度中获取纯文本

$availability = $html->find('span.editable',1)->plaintext;
$searchstring = "Άμεσα Διαθέσιμο";
$cleanavailability = trim($availability);
if (strpos($cleanavailability, $searchstring) !== false) {
echo $cleanavailability;
}

If i echo the $availability i get Άμεσα Διαθέσιμο and it's ok.
But when i search for strpos although the two strings are the same it is always returning false.
Also if i try $somestring = str_replace("Άμεσα","",$cleanavailability ); the $somestring is not changing to "Διαθέσιμο".
Any ideas?
文本 字符串比较 simple-html-dom strpos

评论


答: 暂无答案