Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Quick Question regarding: Only variables should be passed by reference


lostdreamer - 7:36 am on Sep 13, 2012 (gmt 0)



$id = array_pop(explode("_", $key));


There's your problem ;)

explode will return an array.
Array_pop will take that array, and remove the last value from it.

But since you are not supplying Array_pop with an array (but rather a function that returns an array) it cannot modify the array for you.


[php.net...]


Thread source:: http://www.webmasterworld.com/php/4493874.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com