<?php if(isset($_POST['submit'])==false) {?>
-
<?php } else{ $mytext=$_POST['userText']; $url="http://ltpapi.voicecloud.cn/analysis/?api_key=yourapi_key &text=".$mytext."&pattern=pos&format=json"; $fcontents=file_get_contents($url); $jsonObj=json_decode($fcontents); $tempArr=$jsonObj[0][0]; print("
- ".$item->id.", ".$item->cont.", ".$item->pos." "); } }?>
"); foreach($tempArr as $item) { print("