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?

Recommended Answers

All 2 Replies

It might help if you were a little more descriptive about the problem, other than "not ok"...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.