DOE
DOE

Reputation: 53

remove html tags from result in CodeIgniter

I am getting result from database

$query = $this->db->query("Select Query");
return $query->result_array();

In controller

$this->output->set_content_type('application/json');
echo json_encode($query);

Now I want to remove all html tags from text inside array result in model.

Upvotes: 0

Views: 1501

Answers (1)

csabinho
csabinho

Reputation: 1609

You could just use the strip_tags function!

Upvotes: 2

Related Questions