Skip to content

Instantly share code, notes, and snippets.

@taitokiss
Created November 7, 2018 08:17
Show Gist options
  • Save taitokiss/2ca6c6e2d10a4ec4456d8fd142683174 to your computer and use it in GitHub Desktop.
Save taitokiss/2ca6c6e2d10a4ec4456d8fd142683174 to your computer and use it in GitHub Desktop.
URLパラメータの受け取り2
<?php
if (!isset($_GET['id'])) {
$id = null;
} elseif (!is_string($_GET['id'])) {
$id = false;
} else {
$id = $_GET['id'];
}
echo $id;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment