desception Posted October 9, 2014 Share Posted October 9, 2014 Hello guys, not sure why I keep getting this error, can anyone help me? Here is the code: $ext=end(explode('.',$thum)); Quote Link to comment Share on other sites More sharing options...
requinix Posted October 10, 2014 Share Posted October 10, 2014 Only recent versions of PHP (5.5+ I think) allow you to pass a non-variable to end(). If you're running an earlier version then you need a temporary variable. But there's a better way to get file extensions: $end = pathinfo($thum, PATHINFO_EXTENSION); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.