php - <sup> and <sub> tags displaying in Webpage -
i working on project hosts online exams students, , few chemistry questions when trying display subscripts , superscripts formulas , displaying tags in webpage follows, using codeigniter framework this.
//get exam question details including subjects (subjects quiz/exam) $quizrecords = $this->base_model->run_query( "select q.*,qq.*,s.subjectid,s.name subjectname " .$this->db->dbprefix('quiz')." q, ".$this->db->dbprefix('quizquestions') ." qq, ".$this->db->dbprefix('subjects')." s qq.quizid=q.quizid , qq.subjectid=s.subjectid , q.quizid=".$id ); $questarray = array(); foreach ($quizrecords $r) { $subjectwisequestions = $this->base_model->run_query( "select * ".$this->db->dbprefix('questions') ." subjectid=".$r->subjectid." , difficultylevel='" .$r->difficultylevel."' , answer1!='' , answer2!='' , correctanswer!='' order rand() limit ".$r->totalquestion ); array_push($questarray, $subjectwisequestions); }
the question displays follows: energy of electron in hydrogen atom given e=13.6/n2 ev. 1 of following statement true if n changed 1 4 ?
should use html_entity_decode? if yes, suitable place put here in code? appreciated
Comments
Post a Comment