Skip to content

Instantly share code, notes, and snippets.

@attilabacso
Last active November 15, 2022 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save attilabacso/4f21346466499d536c872abd232b3917 to your computer and use it in GitHub Desktop.
Save attilabacso/4f21346466499d536c872abd232b3917 to your computer and use it in GitHub Desktop.
<?php
$json = file_get_contents("php://input");
$data = (array) json_decode($json, true);
if ( array_key_exists('name', $data) ) {
$name = (string) $data['name'];
$value = (int) $data['value'];
$text = (string) $data['text'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment