How can you easily avoid getting this error/notice:
Notice: Undefined offset: 1 in /var/www/page.php on line 149
... in this code:
I'd probably break this up into two steps
$split = explode('|', $value); $func = $split[0]; if(count($split) > 1) $field = $split[1]; else $field = NULL;
There's probably a quicker and neater way though.