Forum Moderators: coopster
I used to like bunching stuff into one line like
implode(',',array_reverse(explode('.',$_SERVER['REMOTE_ADDR']))); ... but apparently newer versions of PHP don't like that.
Is it worth fixing every little PHP warning?
Look at what it says and decide whether you need to do something about it.
"this variable hasn't been declared before using it"
I used to like bunching stuff into one line like
implode(',',array_reverse(explode('.',$_SERVER['REMOTE_ADDR']))); ... but apparently newer versions of PHP don't like that.
I used to like bunching stuff into one line like
implode(',',array_reverse(explode('.',$_SERVER['REMOTE_ADDR']))); ... but apparently newer versions of PHP don't like that.
Not sure why newer versions of PHP don't like that? (It works OK for me.)
I can't remember what nested functions I used, as I've removed all my warnings...
echo array_pop(explode('.',$_SERVER['REMOTE_ADDR'])); Notice: Use of undefined constant WP_ADMIN - assumed 'WP_ADMIN' in ...
// If we are in the admin section...
if (WP_ADMIN == true) {
/* Do some secret admin only stuff here... */