我在未定义的索引中遇到了一些奇怪的事情..
$vatcode = 'U25';
echo $this->vatcode_ids['U25']."\n";
echo $this->vatcode_ids[$vatcode]."\n";
foreach($this->vatcode_account_ids as $id => $vatcode){
echo $vatcode."\n";
echo $this->vatcode_ids[$vatcode]; // undefined index
}
这返回:
681
681
U25
Notice: Undefined index: U25 in /var/www/.....php on line 64
我不明白?!