Stupid question time.
This if statement always shows nothing.
$new = 'test = new user id';
if (stripos($new, 'test') !== FALSE) {
$chk = explode("=",$new);
$chk = $chk[1];
echo $chk;
} else {
$chk = '';
}
echo $chk;
When I echo $chk within the if else it shows the correct value, but the final echo is always blank.
Why?
Shouldn't $chk = "new user id" if the string contains that?
Also is there a neater more succinct way of writing this?
Thanks