Skip to content

Instantly share code, notes, and snippets.

@apanzerj
Created Jun 11, 2012
Embed
What would you like to do?
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