{"action":"opened","issue":{"url":"https://api.github.com/repos/IanGallacher/LearnToCode/issues/6","labels_url":"https://api.github.com/repos/IanGallacher/LearnToCode/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/IanGallacher/LearnToCode/issues/6/comments","events_url":"https://api.github.com/repos/IanGallacher/LearnToCode/issues/6/events","html_url":"https://github.com/IanGallacher/LearnToCode/issues/6","id":57420143,"number":6,"title":"Default level, setting global $level","user":{"login":"reggi","id":296798,"avatar_url":"https://avatars.githubusercontent.com/u/296798?v=3","gravatar_id":"","url":"https://api.github.com/users/reggi","html_url":"https://github.com/reggi","followers_url":"https://api.github.com/users/reggi/followers","following_url":"https://api.github.com/users/reggi/following{/other_user}","gists_url":"https://api.github.com/users/reggi/gists{/gist_id}","starred_url":"https://api.github.com/users/reggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reggi/subscriptions","organizations_url":"https://api.github.com/users/reggi/orgs","repos_url":"https://api.github.com/users/reggi/repos","events_url":"https://api.github.com/users/reggi/events{/privacy}","received_events_url":"https://api.github.com/users/reggi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-12T05:44:40Z","updated_at":"2015-02-12T05:44:40Z","closed_at":null,"body":"I think it's bad practice to have the conditional if `isset` everywhere. I think `index.php` and `game.php` should both have this. Which makes `1` the default level, @IanGallacher don't know if you're ok with that.\r\n\r\n```\r\n<?php $level = isset($_GET['level']) ? $_GET[\"level\"] : \"1\" ?>\r\n```\r\n[shown here](https://github.com/reggi/LearnToCode/blob/master/index.php#L2)\r\n\r\nIt allows you to just use `$level` and not have to worry, it's always set.\r\n\r\n```\r\n<script src=\"js/game.php<?php echo \"?level=\".$level ?>\"></script>\r\n```\r\n[shown here](https://github.com/reggi/LearnToCode/blob/master/index.php#L18)\r\n"}}