Yngvarr

Generation

generate functionTue, 14 Feb 2023

01 to 1

function change01($n): $arr01 = str_split($n); $arr1 = array(); foreach($arr01 as $num){ if($num==0){ $arr1[] = 1; }else{ $arr1[] = 0; } } $r = implode("", $arr1); return $r; change01("0100")

Questions about programming?Chat with your personal AI assistant