Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

Chat Shqip

Chati më i madh Shqipëtar Takohu.com

Futu në Chat !

  • PËRSHËNDETJE VIZITOR!

    Nëse ju shfaqet ky mesazh do të thotë se ju nuk jeni regjistruar akoma. Anëtarët e rregjistruar kanë privilegjin të marrin pjesë në tema të ndryshme si dhe të komunikojnë me anëtarët e tjerë. Bëhu pjesë e forumit Netedy.com duke u REGJISTRUAR këtu ose nëse ke një llogari KYCU. Komunikim alternative i ketij forumi me vajza dhe djem nga te gjithe trevat shqiptare? Hyr ne: CHAT SHQIP.

Loop ++ dhe -- shpjegimi.

centos

forumShqip
ANETAR ✓
Regjistruar më
Dhjetor 13, 2004
Mesazhe
43,241
Pëlqime
40,157
Në gjuhen e programimit dhe shkencat kompjuterike, loop është një strukturë programimi që përsërit një sekuencë udhëzimesh derisa të plotësohet një kriter.

Shembulli pare, do numerojme nga 1 tek 10. Pra kriteri eshte qe kur te shkoje 10 "riperseritja/loop" te ndalet. Per kte do perdor funksionon for() qe perdoret vetem per kriteret numerike. ++ eshte perpara pra 1,2,3,4,5 kurse -- eshte 5,4,3,2,1.


Duke perdorur ++:

for ($numri= 1; $numri<= 10; $numri++) {
echo $numri;
}

Rezultati:
9UoEhTT.png




Duke perdorur --:

for ($numri= 10; $numri>=1; $numri--) {
echo $numri;
}

Rezultati:
3TGV7wy.png
 
Mole mqafsh se skena tru per programin ma.....
Ti je unik plak
 
vetem per numrat sherben?
funksioni for() po.

Por loop mund te besh dhe me funksionet tjera pershembull foreach() dhe while() qe perdoren dhe per strings.

Shembull while derisa kriteri $cibox te behet true. Ne kte rast eshte boolean. por mund te perdoret dhe String

PHP:
$cibox = false;

while (!$cibox) {
/*
* funksione te ndryshme
* Qe do kryhen me rradhe.
*
*
*/



#Ne fund per ta ndaluar bejme qe te plotesohet kriteri.
$cibox = true;
}
 
Last edited by a moderator:
I lope ma shum a i lope ma pak :p ca dmth kjo re :p
 

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back