Php 将响应%40替换为@如何转换

Php 将响应%40替换为@如何转换,php,jquery,Php,Jquery,此函数在查询中搜索%40而不是@: public function check_email() { $main = ($_POST['main']); $this->load->database(); $this->db->where('email', $main); $query = $this->db->get('abc'); } 我需要做哪些更改才能使其不被%40替换为@您可以使用urldecode() echo-urldecode

此函数在查询中搜索%40而不是@:

public function check_email() {
  $main = ($_POST['main']);
  $this->load->database();
  $this->db->where('email', $main);
  $query = $this->db->get('abc');
}  

我需要做哪些更改才能使其不被%40替换为@

您可以使用
urldecode()


echo-urldecode(“%40”);//@

我应该在哪里使用@Daan
$main=urldecode($main)将其置于
$main=($_POST['main'])下