Hi all,
I am trying to find out if an array contains a string of numbers.
If I use the following statement I get this result:
print_r ($data);
Array ( [i_agree] => 1 [status] => Array ( [3] => 1 [19] => 1 [87] => 1 [89] => 0 [99] => 0 [104] => 1 [107] => 1 ) [is_active] => 1 [signup_email_sent] => 1 [is_locked] => [aff_paypal_email] => [selected_lang] => en )
The code I am using is:
$result = $row_members['data'];
$data = unserialize($result);
if(in_array("107", $data)) {
echo "107 is in the Array";
} else {
echo "107 is NOT in Array";
}
The result of runniung the code is always "107 is not in Array".
I know I'm doing something wrong but what?
Can anyone help or advise please.