[Solved] How Can I echo this series 0110011001100110 in php


Try This
$i = 0;
$j = 1;
echo $i;
$flag = 1;  
$inc = 0;
for($k = 0; $k <= 10; $k++) {
    $inc++;
    if($flag == 0){
        echo $i;
        if($inc == 2){
            $flag = 1;
            $inc = 0;
        }
    }elseif($flag == 1){
        echo $j;
        //$flag = 0;
        if($inc == 2){
            $flag = 0;
            $inc = 0;
        }
    }
}

1

solved How Can I echo this series 0110011001100110 in php