im new in PHP. just a simple question :
Coding :
foreach($group as $b)
{
if($b == 0){
echo "error";
}
else{
echo "true";
}
}
i want value $b that "true" add to new array.
thanks.
$arr = array();
foreach($group as $b) {
if ($b == 0) {
echo "error";
} else {
echo "true";
$arr[] = $b;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With