Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $stats = array();
- for($i = 1; $i <= 12; $i++) {
- $stats[$i] = retrieveStats('orange/actualite', '2010', '10'));
- if ($stats[$i] === false) {
- $stats[$i] = array(
- 'un' => 123,
- 'deux' => 234,
- 'trois' => 345,
- );
- storeStats('orange/actualite', '2010', '10', $stats[$i]);
- }
- }
- function storeStats($section_name, $year, $month, $stats) {
- foreach ($stats as $stats_name => $stats_value) {
- $this->db->insert('stats_orange', array(
- 'section_name' => $section_name,
- 'month' => $month,
- 'year' => $year,
- 'stats_name' => $stats_name,
- 'stats_value' => $stats_value,
- );
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement