Skip to content

Instantly share code, notes, and snippets.

@apanzerj
Created June 11, 2012 18:08
Show Gist options
  • Save apanzerj/2911684 to your computer and use it in GitHub Desktop.
Save apanzerj/2911684 to your computer and use it in GitHub Desktop.
Former PHP GIST 2
<?php
foreach($_POST as $key => $value){
if(preg_match('/^z_/i',$key)){
$arr[strip_tags($key)] = strip_tags($value);
}
}
$create = json_encode(array('ticket' => array('subject' => $arr['z_subject'], 'comment' => array( "value"=> $arr['z_description']), 'requester' => array('name' => $arr['z_name'], 'email' => $arr['z_requester']))));
$return = curlWrap("/tickets.json", $create);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment