Hi,
The Yii doesn’t love me . I think I will cheat on her with the raw PHP .
So I’ve gotten this error: Error undefined offset:
public function saveBettings() {
$tippmixBettings = $this->fetchTippmix();
foreach ($tippmixBettings as $tippmixBetting) {
var_dump($tippmixBetting[10]); // Here the undefined offset error <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif' class='bbc_emoticon' alt=':)' />
$betting = Betting::find()->where([
'number'=>$tippmixBetting[0],
'match_name'=> utf8_decode($tippmixBetting[2]),
However it is very bizarre, because with raw PHP I found, and this is an exist array key…
Because the var_dump or print_r commands are working, this is how the $tippmixBetting looks like:
array (size=11)
0 => string '007' (length=3)
1 => string 'tenisz, ffi1' (length=12)
2 => string 'F. Lopez - I. Karlovic' (length=22)
3 => string '---' (length=3)
4 => string '---' (length=3)
5 => string '1.79' (length=4)
6 => string '' (length=0)
7 => string '0-2' (length=3)
8 => string '' (length=0)
9 => string 'Memphis' (length=7)
10 => string 'tenisz, ffi' (length=11)
Here the part of the outputs:
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'labdarúgás' (length=16)
string 'alpesi sÃÂ, női' (length=20)
string 'sÃÂfutás, női' (length=21)
string 'sÃÂugrás, ffi' (length=18)
string 'jégkorong, női' (length=20)
string 'jégkorong, női' (length=20)
string 'jégkorong, ffi' (length=17)
Why? There is the $tippmixBetting[10]… In raw PHP I have not gotten any notice…