Apply for Zend Framework Certification Training

Php Questions




< Php Questions Part 2 Draw/make number pyramid using php >



for($i=2;$i<=100;$i++){
        $flag = 0;
        for($j=2;$j<$i;$j++){
            $rem = $i%$j;
            echo $rem.',';
            if($rem == 0){
                $flag++;
            }
        }
        if($flag == 0){
            echo $i.'- ';
            echo "<br>";
        }
    }

< Php Questions Part 2 Draw/make number pyramid using php >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top