php - How to maintain the integrity of the data from the columns in the tables in the database

I want to keep the character/r/n
for "history" data and I don't want to omit the "/r/n" when displayed in the HTML.
public function get3Tbl($id_siswa)
{
return DB::table('tbl_siswa')
->join('tbl_mapel', 'tbl_siswa.id_mapel', '=', 'tbl_mapel.id_mapel')
->join('tbl_guru', 'tbl_siswa.id_guru', '=', 'tbl_guru.id_guru')
->join('tbl_wiki', 'tbl_siswa.id_wiki', '=', 'tbl_wiki.id_wiki')
->addSelect('nis')
->addSelect('nama_siswa')
->addSelect('tbl_mapel.mapel')
->addSelect('tbl_guru.nama_guru')
->addSelect('foto_siswa')
->addSelect('tbl_wiki.adaptasi')
->addSelect('tbl_wiki.total_eps')
->addSelect('tbl_wiki.thn_produksi')
->addSelect('tbl_wiki.history')
->addSelect('tbl_wiki.description_char')
->where('tbl_wiki.id_siswa', $id_siswa)
->first();
}
Answer
Solution:
for not printing you can use {!! $value !!} , it just print what ever is in the $value
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: uncaught mysqli_sql_exception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.