Why not find the string?

if (mb_strpos('Duct of galvanized steel 700х1300 6=0,7', 'Duct')) { echo 'sdfsdf";}


Finds a string, and the offset would be the best possible tried and with mb and without mb not finding and it should.
April 3rd 20 at 17:38
2 answers
April 3rd 20 at 17:40
if (mb_strpos('Duct of galvanized steel 700х1300 6=0,7', 'Duct') !== false)


finds from on 0 positions, and 0 if it is false, so you need to explicitly ask not false there.

https://www.php.net/manual/ru/types.comparisons.php
April 3rd 20 at 17:42
There's sort of swap is necessary, if I am not mistaken.
mb_strpos('Duct', 'Duct of galvanized steel 700х1300 6=0,7')

Find more questions by tags PHP