嗨,我正在开发一个基于web的试卷生成器使用Codeigniter,其中我必须存储问题在乌尔都语和英语它的工作很好的英语的问题,但在检索乌尔都语的问题时,它的格式不符合乌尔都语的实际格式,我得到了以下结果:
电流输出

虽然我想要的输入是这样的格式:

<div class="col-md-12">
<fieldset>
<legend>All Questions</legend>
<div id="questions" lang="ur" style="text-align: right;">
<?php
if(isset($posted['subject_id'])){
$id = $posted['chapter_id'];
$query=$this->db->select()
->from('short_question')
->where('chapter_id', $id)
->get();
$result= $query->result();
if($result){
$counter = 1;
foreach ($result as $row) { ?>
<div class="row">
<div class="col-md-12">
<?= $row->s_question ?> <?= $counter ?>
</div>
</div>
<?php
$counter++;
}
}else {
echo '<center><h2>No Record Found</h2></center>';
}
}
?>
</fieldset>
</div>
这是我的代码,我刚接触stackover flow,请忽略我在发布问题时犯的任何错误......提前感谢
发布于 2020-02-07 18:26:27
转到表结构并将归类latin1_swedish_ci更改为utf8_general_ci.您将获得正常数组作为响应,并将其显示为您在英语中使用的数组。
https://stackoverflow.com/questions/51395459
复制相似问题