0

Hello,

is my eyes wrong or what but I cannot see simple thing.

//ok
            $this->utils->logging('DEBUG', 'submit dogs card5: ' . serialize($slip_data));

            foreach ($slip_data as $data) {     
                //not ok
                $this->utils->logging('DEBUG', 'submit dogs card7: ' . serialize($data));
            };

the first logging line logs this array:

array (
  36017 => 
  array (
    'subtypes_id' => '1667',
    'special_odds_value' => '0',
    'matches_id' => '805',
    'br_freetext' => 'finisher',
    'coefs_id' => '36017',
    'odd_type' => 'finisher-3',
    'coef' => 1.6,
    'br_odds_id' => '0',
    'home_team' => NULL,
    'away_team' => NULL,
    'br_match_id' => '0',
    'subtype_categories_id' => '4',
    'stake' => '1',
    'stake_eur' => 0.28962001853568,
  ),
  36051 => 
  array (
    'subtypes_id' => '1669',
    'special_odds_value' => '0',
    'matches_id' => '805',
    'br_freetext' => 'even',
    'coefs_id' => '36051',
    'odd_type' => 'even',
    'coef' => 1.5,
    'br_odds_id' => '0',
    'home_team' => NULL,
    'away_team' => NULL,
    'br_match_id' => '0',
    'subtype_categories_id' => '4',
    'stake' => '3',
    'stake_eur' => 0.86886005560704,
  ),
)

And another log line logs to times the same array:

array (
  'subtypes_id' => '1667',
  'special_odds_value' => '0',
  'matches_id' => '805',
  'br_freetext' => 'finisher',
  'coefs_id' => '36017',
  'odd_type' => 'finisher-3',
  'coef' => 1.6,
  'br_odds_id' => '0',
  'home_team' => NULL,
  'away_team' => NULL,
  'br_match_id' => '0',
  'subtype_categories_id' => '4',
  'stake' => '1',
  'stake_eur' => 0.28962001853568,
)

Another time:

array (
  'subtypes_id' => '1667',
  'special_odds_value' => '0',
  'matches_id' => '805',
  'br_freetext' => 'finisher',
  'coefs_id' => '36017',
  'odd_type' => 'finisher-3',
  'coef' => 1.6,
  'br_odds_id' => '0',
  'home_team' => NULL,
  'away_team' => NULL,
  'br_match_id' => '0',
  'subtype_categories_id' => '4',
  'stake' => '1',
  'stake_eur' => 0.28962001853568,
)

I have no clue how can this be. You have an idea?

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by McLaren
0

found the cause. In previous foreach loop I was using reference and did not unset it for the $data variable.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.