simplehtmldom returning span plaintext is not handled as string

13 Views Asked by At

I am getting a plain text from a span with this code

$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?
0

There are 0 best solutions below