Created
March 24, 2014 21:25
-
-
Save bkmorse/9749484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private function compare_data($json_data = false, $table_data = false) | |
| { | |
| if($json_data == false || $table_data == false) | |
| return false; | |
| // total number of events do not match, so there has to be a difference | |
| if(count($json_data) != count($table_data)) | |
| return false; | |
| foreach($json_data as $json_value) | |
| { | |
| foreach($table_data as $table_value) | |
| { | |
| if($json_value['event_id'] != $table_value['event_id']) | |
| return false; | |
| if($json_value['date_schedule'] != $table_value['date_schedule']) | |
| return false; | |
| if($json_value['city'] != $table_value['city']) | |
| return false; | |
| if($json_value['venue'] != $table_value['venue']) | |
| return false; | |
| if($json_value['buy_link'] != $table_value['buy_link']) | |
| return false; | |
| } | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment