I retrieve an URL like below
http://localhost/codeigniter/?first=value_on_first_param&second=value_on_second_param
And at that URL I have code to retrieve the URL that has some GET parameters on URL
if( $first = $this->input->get( 'first' )
&& $second = $this->input->get( 'second' )
){
echo 'first param: '.$first;
echo '<br />';
echo 'second param: '.$second;
}
Then I try to print the output of params that assigned to some variables
first param: 1
second param: value_on_second_param
As we see above, I have first param value to be 1 not value_on_first_param. Why? Am I doing something wrong here? Thanks.
Its because the assignment:
You do
is like
so the
$firstwill get true value.You have to use it: