0
Предположим, у меня есть вход, где я прошу пользователя поставить только букву карты. Скажем, «KdKc». Помимо отображения пользователя KDKC/kdkc/KdKc, я хотел бы показать юникод для костюмов. K ⋄ K ♣Вход в unicode в mysql и угловом
Кто-нибудь знает, как это сделать?
Я вставив его в таблицу, как это:
$hand = json_decode(file_get_contents("php://input"),true);
$hand_names = array('handNumber', 'hand');
$keys = array_keys($hand);
$columns = '';
$values = '';
foreach($column_names as $desired_key){ // Check the hand received. If blank insert blank into the array.
if(!in_array($desired_key, $keys)) {
$$desired_key = '';
}else{
$$desired_key = $hand[$desired_key];
}
$columns = $columns.$desired_key.',';
$values = $values."'".$$desired_key."',";
}
$query = "INSERT INTO hands_table(".trim($columns,',').") VALUES(".trim($values,',').")";
if(!empty($hand)){
$r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);
$success = array('status' => "Success", "msg" => "Hand Created Successfully.", "data" => $hand);
$this->response($this->json($success),200);
}else
$this->response('',204); //"No Content" status
и показывая через нг-повторить
<tr ng-repeat="data in customers">
<td>{{data.hand}}</td>
<td><a href="#/edit-hand/{{data.handNumber}}" class="btn"> <i class="glyphicon glyphicon-edit"></i> Edit Hand</a></td>
</tr>
Я ценю время!
Не может быть лучше! Благодаря!!! – spaceman