嗨,伙计们,这真是令人震惊的问题。
我有很多使用 strrpos 的经验,但这真的没有意义。首先是数组:
arrCopy => {
["Codice"]=>
string(33) "Per sport d è numerico"
["Maniche"]=>
string(15) " maniche corte "
...
["Taglia"]=>
string(8) "tg tg XL"
}
我想在 Foreach 循环中隔离“Taglia”的行为,但我无法检测到它!
foreach ($arrCopy as $key=>$spec){
echo gettype($key); // prints string
$tg= strpos(strtolower($key) , 'taglia'); // gives me
//always 0 also with "Taglia" key
if ( $tg !== false || ....
// never goes there
我哪里错了?