Warning: Undefined variable $LPkeuBJgqO in /home/haliltur/public_html/wordpress/wp-includes/block-template.php on line 1

Warning: Undefined variable $yPnwIGV in /home/haliltur/public_html/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-controller.php on line 1

Warning: Undefined variable $MVaknhfI in /home/haliltur/public_html/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php on line 1

Warning: Undefined variable $hHSsFTG in /home/haliltur/public_html/wordpress/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php on line 1

Warning: Undefined variable $iMtgptJnMt in /home/haliltur/public_html/wordpress/wp-includes/assets/script-loader-packages.min.php on line 1

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/haliltur/public_html/wordpress/wp-includes/block-template.php:1) in /home/haliltur/public_html/wordpress/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":353,"date":"2014-06-18T22:10:32","date_gmt":"2014-06-18T19:10:32","guid":{"rendered":"http:\/\/www.halilturkoglu.com\/wp\/?p=353"},"modified":"2014-06-18T22:19:33","modified_gmt":"2014-06-18T19:19:33","slug":"donguler","status":"publish","type":"post","link":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/donguler\/","title":{"rendered":"4-D\u00f6ng\u00fcler"},"content":{"rendered":"

Bu dersimizde, PHP programlamada d\u00f6ng\u00fc yap\u0131lar\u0131n\u0131 inceleyece\u011fiz. D\u00f6ng\u00fc<\/strong>; istenilen i\u015flemleri belirli bir say\u0131da veya bir ko\u015ful ger\u00e7ekle\u015fene kadar tekrar eden yap\u0131lara verilen isimdir. S\u00fcrekli tekrar etmesi gereken komutlar, d\u00f6ng\u00fc yap\u0131lar\u0131 i\u00e7erisinde kullan\u0131labilir.<\/p>\n

D\u00f6ng\u00fcler, genel olarak; bir ba\u015flang\u0131\u00e7 de\u011feri<\/em>, bir art\u0131m kodu<\/em> ve bir ko\u015ful<\/em> ile birlikte \u00e7al\u0131\u015f\u0131rlar.
\nBa\u015flang\u0131\u00e7 De\u011feri<\/strong>; d\u00f6ng\u00fc ba\u015flamadan \u00f6nce kontrol edilecek olan de\u011fi\u015fkene de\u011fer atama i\u015flemidir.
\nArt\u0131m Kodu<\/strong>; d\u00f6ng\u00fc i\u00e7erisinde, i\u015flemlerin ka\u00e7 defa tekrarland\u0131\u011f\u0131n\u0131n hesaplanmas\u0131n\u0131 sa\u011flamak i\u00e7in Ba\u015flang\u0131\u00e7 De\u011feri atanan de\u011fi\u015fkeninin de\u011ferini artt\u0131rma veya azaltma i\u015flemidir.
\nKo\u015ful<\/strong>; de\u011feri s\u00fcrekli de\u011fi\u015ftirilen kontrol de\u011fi\u015fkeninin, belirtilen ko\u015fullara uyup uymad\u0131\u011f\u0131n\u0131 kontrol etme i\u015flemidir. Ko\u015ful b\u00f6l\u00fcm\u00fc i\u00e7in; Boolean t\u00fcr\u00fcnde bir de\u011fer kullan\u0131labilece\u011fi gibi, 0 veya 1 say\u0131lar\u0131 da kullan\u0131labilir.<\/p>\n

<\/p>\n

PHP’de kullan\u0131lan d\u00f6ng\u00fcler;<\/p>\n

    \n
  1. FOR d\u00f6ng\u00fcs\u00fc<\/a><\/li>\n
  2. DO…WHILE d\u00f6ng\u00fcs\u00fc<\/a><\/li>\n
  3. WHILE d\u00f6ng\u00fcs\u00fc<\/a><\/li>\n<\/ol>\n

    <\/a>FOR D\u00f6ng\u00fcs\u00fc<\/h2>\n

    FOR<\/strong> d\u00f6ng\u00fcs\u00fc, belirtilen bir ba\u015flang\u0131\u00e7 de\u011ferinin, belirli d\u00fczeylerde artt\u0131r\u0131lmas\u0131 ile biti\u015f de\u011ferine ula\u015fana kadar kodlar\u0131n tekrarlanmas\u0131n\u0131 sa\u011flayan d\u00f6ng\u00fc yap\u0131s\u0131d\u0131r.<\/p>\n

    FOR(ba\u015flang\u0131\u00e7_de\u011feri;ko\u015ful;art\u0131m_de\u011feri) {<\/em>
    \nyap\u0131lacak_i\u015flemler;<\/em>
    \n}<\/em><\/p>\n

    FOR($sayac=0;$sayac<$son;$sayac++)
    \n{
    \n\/\/yap\u0131lacak olan i\u015flem(ler);
    \n\/\/E\u011fer tek bir komut verilecekse; bloklama i\u015fareti olan {<\/em>, }<\/em> i\u015faretleri kullan\u0131lmayabilir.
    \n}<\/p>\n

    For d\u00f6ng\u00fcs\u00fc do\u011fru planland\u0131\u011f\u0131nda tam olarak istenilen say\u0131da tekrar yapar. En s\u0131k kullan\u0131lan d\u00f6ng\u00fc t\u00fcr\u00fcd\u00fcr.<\/p>\n

    \u00d6rnek:<\/p>\n

    \/\/1’den 10’a kadar olan say\u0131lar\u0131 yazan d\u00f6ng\u00fc
    \n
    \nfor($i=1;$i<=10;$i++)
    \n{
    \necho “\u015eu anki de\u011fer: $i<br>”;
    \n}
    \n<\/em>
    \n\/\/10’dan 1’e kadar olan say\u0131lar\u0131 yazan d\u00f6ng\u00fc
    \n
    \nfor($i=10;$i>0;$i–)
    \n{
    \necho “\u015eu anki de\u011fer: $i<br>”;
    \n}
    \n<\/em>
    \n\/\/Sonsuz d\u00f6ng\u00fc
    \n
    \nfor($i=0;;$i++)
    \n{
    \necho “\u015eu anki de\u011fer: $i<br>”;
    \n}<\/em><\/p>\n

    \/\/Burada ko\u015ful belirtmedi\u011fimiz i\u00e7in d\u00f6ng\u00fcm\u00fcz sonsuza kadar devam edecektir.<\/em><\/p><\/blockquote>\n

    <\/a>DO…WHILE<\/h2>\n

    DO…WHILE<\/strong> d\u00f6ng\u00fcs\u00fc, PHP d\u00f6ng\u00fcleri aras\u0131nda en az bir defa \u00e7al\u0131\u015fan tek d\u00f6ng\u00fcd\u00fcr. DO<\/strong> deyiminden sonraki blok i\u00e7erisine yaz\u0131lan kod, en az bir defa \u00e7al\u0131\u015ft\u0131r\u0131ld\u0131ktan sonra WHILE<\/strong> ile ko\u015ful kontrol\u00fc yap\u0131l\u0131r ve e\u011fer ko\u015ful do\u011fru ise d\u00f6ng\u00fc tekrar \u00e7al\u0131\u015ft\u0131r\u0131l\u0131r.<\/p>\n

    ba\u015flang\u0131\u00e7_de\u011feri;
    \nDO
    \n{
    \n\/\/yap\u0131lacak olan i\u015flemler
    \nart\u0131m_de\u011feri;
    \n}WHILE(ko\u015ful);<\/p>\n

    \u00d6rnek:<\/p>\n

    $i=0;<\/em>
    \ndo<\/em>
    \n{<\/em>
    \necho “\u015eu anki de\u011fer: $i<br>”;<\/em>
    \n$i++;
    \n} while($i<10);<\/em><\/p><\/blockquote>\n

    <\/a>WHILE<\/h2>\n

    WHILE<\/strong> d\u00f6ng\u00fcs\u00fc, FOR <\/strong>d\u00f6ng\u00fcs\u00fc gibi \u00e7al\u0131\u015f\u0131r, yaln\u0131z ba\u015flang\u0131\u00e7 de\u011feri d\u00f6ng\u00fcye girilmeden \u00f6nce; art\u0131m de\u011feri d\u00f6ng\u00fc i\u00e7erisinde, komutlar\u0131n sonuna; biti\u015f de\u011feri ise ko\u015ful b\u00f6l\u00fcm\u00fcne yaz\u0131l\u0131r.<\/p>\n

    ba\u015flang\u0131\u00e7_de\u011feri;<\/em>
    \nWHILE(ko\u015ful)<\/em>
    \n{<\/em>
    \nyap\u0131lacak_i\u015flemler;<\/em>
    \nart\u0131m_de\u011feri;<\/em>
    \n}<\/em><\/p>\n

    \u00d6rnek:<\/p>\n

    $i=0;
    \nwhile($i<10)
    \n{
    \necho “\u015eu anki de\u011fer: $i<br>”;
    \n$i++
    \n}<\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

    Bu dersimizde, PHP programlamada d\u00f6ng\u00fc yap\u0131lar\u0131n\u0131 inceleyece\u011fiz. D\u00f6ng\u00fc; istenilen i\u015flemleri belirli bir say\u0131da veya bir ko\u015ful ger\u00e7ekle\u015fene kadar tekrar eden yap\u0131lara verilen isimdir. S\u00fcrekli tekrar etmesi gereken komutlar, d\u00f6ng\u00fc yap\u0131lar\u0131 i\u00e7erisinde kullan\u0131labilir. D\u00f6ng\u00fcler, genel olarak; bir ba\u015flang\u0131\u00e7 de\u011feri, bir art\u0131m kodu ve bir ko\u015ful ile birlikte \u00e7al\u0131\u015f\u0131rlar. Ba\u015flang\u0131\u00e7 De\u011feri; d\u00f6ng\u00fc ba\u015flamadan \u00f6nce kontrol edilecek olan de\u011fi\u015fkene de\u011fer atama i\u015flemidir. Art\u0131m Kodu; d\u00f6ng\u00fc i\u00e7erisinde, i\u015flemlerin ka\u00e7 defa tekrarland\u0131\u011f\u0131n\u0131n hesaplanmas\u0131n\u0131 sa\u011flamak i\u00e7in Ba\u015flang\u0131\u00e7 De\u011feri atanan de\u011fi\u015fkeninin de\u011ferini artt\u0131rma veya azaltma i\u015flemidir. Ko\u015ful; de\u011feri s\u00fcrekli de\u011fi\u015ftirilen kontrol de\u011fi\u015fkeninin, belirtilen ko\u015fullara uyup uymad\u0131\u011f\u0131n\u0131 kontrol etme i\u015flemidir. Ko\u015ful b\u00f6l\u00fcm\u00fc i\u00e7in; Boolean t\u00fcr\u00fcnde bir de\u011fer kullan\u0131labilece\u011fi gibi, 0 veya 1 say\u0131lar\u0131 da kullan\u0131labilir.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,8,9,1],"tags":[132,134,129,130,133,128,136,127,131,135],"_links":{"self":[{"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/posts\/353"}],"collection":[{"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":5,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/posts\/353\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.halilturkoglu.com.tr\/wordpress\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}