[Solved] how assign value to a variable using anchor tag [duplicate]
No you can not assign values to PHP variable using onClick (JavaScript Function), but it is possible to capture and set URL param through $_GET method. If you are using Codeigniter, you must load CodeIgniter URL Helper Library first. $this->load->helper(‘url’); try below, <?php if(isset($_GET[‘view_set’]) && $_GET[‘view_set’] == ‘list’) { $view_set = “list”; echo “i am … Read more