• 05-08-2014, 21:46:42
    #1
        $start_pos = ($_GET['start_pos']) ? $_GET['start_pos'] : '0';
        $end_point = ($_GET['end_point']) ? $_GET['end_point'] : '10';
        
        for($i = $start_pos; $i <= $end_point; ++$i) {
    yukarıdaki kodu kullanınca 0'dan 10'a kadar tek tek sayıyor. çıktısı

    1,2,3,4,5,6,7,8,9 şeklinde oluyor. benim yapmak istediğim şey

    30,60,90,120,150 şeklinde 30ar 30ar gitmesi. bunu nasıl yapabilirim?
  • 05-08-2014, 21:55:28
    #2
    $start_pos = ($_GET['start_pos']) ? $_GET['start_pos'] : '0';
    $end_point = ($_GET['end_point']) ? $_GET['end_point'] : '10';
    *
    for($i = $start_pos; $i <= $end_point; ++$i) {
    
    echo $i*30; 
    }
    problemini çözebilir hocam
  • 05-08-2014, 22:11:49
    #3
    PiEycPi adlı üyeden alıntı: mesajı görüntüle
    $start_pos = ($_GET['start_pos']) ? $_GET['start_pos'] : '0';
    $end_point = ($_GET['end_point']) ? $_GET['end_point'] : '10';
    *
    for($i = $start_pos; $i <= $end_point; ++$i) {
    
    echo $i*30; 
    }
    problemini çözebilir hocam
    teşekkürler hocam artıladım.