mdmartiny Posted April 8, 2012 Share Posted April 8, 2012 I keep getting this error code and not sure why Strict Standards: Only variables should be passed by reference in This is the line of code that it reference to. $file_ext = strtolower(end(explode(".", $file_name))); Can someone please help me Link to comment https://forums.phpfreaks.com/topic/260544-strict-standards-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 8, 2012 Share Posted April 8, 2012 end expects an actual array variable as a parameter - 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. You need to assign the result of the explode() statement to a program variable and then supply that as the parameter to the end() statement. Link to comment https://forums.phpfreaks.com/topic/260544-strict-standards-help/#findComment-1335319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.