Welcome Guest, Not a member yet? Register   Sign In
Only variables should be passed by reference
#2

(This post was last modified: 01-26-2016, 10:23 PM by josepostiga.)

Check the PHP documentation about the end() function: http://php.net/manual/en/function.end.php

Quoting the parameters section:
Quote:array
The array. This array is passed by reference because it is modified by the function. This means you must pass it a real variable and not a function returning an array because only actual variables may be passed by reference.

Try this:
PHP Code:
$segments $this->uri->segment_array(); 

$section end($segments); 
Best regards,
José Postiga
Senior Backend Developer
Reply


Messages In This Thread
RE: Only variables should be passed by reference - by josepostiga - 01-26-2016, 10:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB