Welcome Guest, Not a member yet? Register   Sign In
pass a variable to controller (with nonenglish characters)
#1

[eluser]chejnik[/eluser]
Hello,
I would like to pass some variables to controller, but they contain nonEnglish characters (like æ,ð) from Icelandic alphabet.

First I make search query and I make list of headwords. Clicking on headword I would like to make detail view of headword with format. So I have to pass the headword and his number.

Code:
if($query->num_rows()>0){
                foreach($query->result() as $row){  
                       $segments = array('search', 'showHeadword', $row->keyword, $row->num_keyword );
                       $url = site_url($segments);    
                
                       $listheadwords[]= anchor($url, $row->keyword.','. $row->gram_1);
            
                }
                 }  
                $data['listheadwords'] = $listheadwords;

            
             $this->load->view('searchresults', $data);

I am not sure if I do it correctly, but I make hyperlink. The last to items in segments array are variables, right?
Thank you for help and the CodeIgniter.
Ales


Messages In This Thread
pass a variable to controller (with nonenglish characters) - by El Forum - 02-10-2008, 08:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB