PHP 8.4.24 Released!

Voting

: min(four, zero)?
(Example: nine)

The Note You're Voting On

gambajaja at yahoo dot com
15 years ago
<?php
$my_array = array ('100,101', '200,201', '300,301');
$check_me_in = array ('100','200','300','400');
foreach ($check_me_in as $value_cmi){
    $is_in=FALSE; #asume that $check_me_in isn't in $my_array
    foreach ($my_array as $value_my){
        $pos = strpos($value_my, $value_cmi);
        if ($pos===0)
            $pos++;
        if ($pos==TRUE){
            $is_in=TRUE;
            $value_my2=$value_my;
            }
    }
    if ($is_in) echo "ID $value_cmi in \$check_me_in I found in value '$value_my2' \n";
}
?>

The above example will output
ID 100 in $check_me_in I found in value '100,101' 
ID 200 in $check_me_in I found in value '200,201' 
ID 300 in $check_me_in I found in value '300,301'

<< Back to user notes page

To Top