PHP: do-while - Manual in English
PHP: do-while - Manual in Deutsch
PHP: do-while - Manual in Polish

Vous êtes à PHP: do-while - Manual Area


recherches récentes:
incluez les fonctions , fonctions variables , fonctions de poteau...




Si vous êtes nouveau au PHP ou devez juste régénérer vos qualifications, c'est l'endroit à commencer. Cette série de cours d'instruction te donnera la connaissance de base que vous devrez créer un simple Site Web de PHP.

Le PHP est un langage de programmation r3fléchissant à l'origine conçu pour produire les pages Web dynamiques. [1] Le PHP est employé principalement dans le serveur-côté scripting, mais peut être employé d'une ligne de commande interface ou dans des applications graphiques autonomes. Des interfaces utilisateurs textuelles peuvent également être créées utilisant des ncurses.

do-while


do-while

Les boucles do-while ressemblent beaucoup aux boucles while, mais l'expression est testée à la fin de chaque itération plutôt qu'au début. La principale différence par rapport à la boucle while est que la première itération de la boucle do-while est toujours exécutée (l'expression n'est testée qu'à la fin de l'itération), ce qui n'est pas le cas lorsque vous utilisez une boucle while (l'expression est vérifiée au début de chaque itération).

Il n'y a qu'une syntaxe possible pour les boucles do-while :

Exemple #1 Instruction do-while

<?php
$i 
0;
do {
    echo 
$i;
} while (
$i 0);
?>

La boucle ci-dessus ne va être exécutée qu'une seule fois, car lorsque l'expression est évaluée, elle vaut FALSE (car la variable $i n'est pas plus grande que 0) et l'exécution de la boucle s'arrête.

Les utilisateurs familiers du C sont habitués à une utilisation différente des boucles do-while , qui permet de stopper l'exécution de la boucle au milieu des instructions, en l'encapsulant dans un do-while(0) la fonction break. Le code suivant montre une utilisation possible :

Exemple #2 Instruction while et break

<?php
do {
    if (
$i 5) {
        echo 
"i n'est pas suffisamment grand";
        break;
    }
    
$i *= $factor;
    if (
$i $minimum_limit) {
        break;
    }
   echo 
"i est bon";

    
/* ...traitement de i... */

} while (0);
?>

Ne vous inquiétez pas si vous ne comprenez pas tout correctement. Vous pouvez écrire des scripts très très puissants sans utiliser cette fonctionnalité.


Identyfikacja RFID
Agencja reklamowa Gadżety reklamowe usługi
Profesjonalna drukarnia dla twojego biznesu.
kredyt banki
nieruchomości
902 903

Des autres fonctions utiles :


xsltprocessor.transformtodoc | security.cgi-bin.doc-root | sdodasrel.setup | sdodasrel.resources | sdodasrel.installation | sdodasrel.constants | sdodasrel.configuration | sdo.setup | sdo.sample.sequence | sdo.sample.reflection | sdo.sample.getset | sdo.resources | sdo.limitations | sdo.installation | sdo.examples | sdo.das.rel.metadata | sdo.das.rel.limitations | sdo.das.rel.examples.two-table | sdo.das.rel.examples.three-table | sdo.das.rel.examples.one-table | sdo.das.rel.examples | sdo.constants | sdo.configuration | sdo-das-xml.setup | sdo-das-xml.resources | sdo-das-xml.installation | sdo-das-xml.examples | sdo-das-xml.constants | sdo-das-xml.configuration | refs.utilspec.windows | refs.database.vendors | ref.sdo | ref.sdo.das.rel | ref.sdo-das-xml | ref.qtdom | ref.pdo-sqlite | ref.pdo-sqlite.connection | ref.pdo-pgsql | ref.pdo-pgsql.connection | ref.pdo-odbc | ref.pdo-odbc.connection | ref.pdo-oci | ref.pdo-oci.connection | ref.pdo-mysql | ref.pdo-mysql.connection | ref.pdo-informix | ref.pdo-informix.connection | ref.pdo-ibm | ref.pdo-ibm.connection | ref.pdo-firebird | ref.pdo-firebird.connection | ref.pdo-dblib | ref.pdo-dblib.connection | ref.paradox | ref.dotnet | ref.domxml | qtdom.setup | qtdom.resources | qtdom.installation | qtdom.constants | qtdom.configuration | pdostatement.setfetchmode | pdostatement.setattribute | pdostatement.rowcount | pdostatement.nextrowset | pdostatement.getcolumnmeta | pdostatement.getattribute | pdostatement.fetchobject | pdostatement.fetchcolumn | pdostatement.fetchall | pdostatement.fetch | pdostatement.execute | pdostatement.errorinfo | pdostatement.errorcode | pdostatement.columncount | pdostatement.closecursor | pdostatement.bindvalue | pdostatement.bindparam | pdostatement.bindcolumn | pdo.transactions | pdo.setup | pdo.setattribute | pdo.rollback | pdo.resources | pdo.quote | pdo.query | pdo.prepared-statements | pdo.prepare | pdo.lobs | pdo.lastinsertid | pdo.installation | pdo.getavailabledrivers | pdo.getattribute | pdo.exec | pdo.errorinfo | pdo.errorcode | pdo.error-handling | pdo.drivers | pdo.construct | pdo.constants | pdo.connections | pdo.configuration | pdo.commit | pdo.begintransaction | paradox.setup | paradox.resources | paradox.installation | paradox.constants | paradox.configuration | language.references.whatdo | language.pseudo-types | language.oop5.paamayim-nekudotayim | keyword.paamayim-nekudotayim | intro.sdodasrel | intro.sdo | intro.sdo-das-xml | intro.qtdom | intro.pdo | intro.paradox | intro.domxml | intro.dom | intro-whatcando | internals2.pdo.testing | internals2.pdo.preparation | internals2.pdo.pdo_stmt_t | internals2.pdo.pdo-dbh-t | internals2.pdo.packaging | internals2.pdo.implementing | internals2.pdo | internals2.pdo.error-handling | internals2.pdo.constants | internals2.pdo.building | install.windows.xitami | install.windows.sun | install.windows.sambar | install.windows.omnihttpd | install.windows.manual | install.windows.installer | install.windows.iis | install.windows | install.windows.extensions | install.windows.building | install.windows.apache2 | install.windows.apache1 | install.windows.activescript | install.pecl.windows | install.pecl.downloads | function.yp-get-default-domain | function.xmlwriter-start-document | function.xmlwriter-end-document | function.vpopmail-del-domain | function.vpopmail-del-domain-ex | function.vpopmail-alias-del-domain | function.vpopmail-add-domain | function.vpopmail-add-domain-ex | function.vpopmail-add-alias-domain | function.vpopmail-add-alias-domain-ex | function.udm-get-doc-count | function.tidy-get-opt-doc | function.textdomain | function.swfbutton.setdown | function.swf-startdoaction | function.swf-enddoaction | function.stream-socket-shutdown | function.socket-shutdown | function.soap-soapclient-dorequest | function.simplexml-import-dom | function.runkit-class-adopt | function.register-shutdown-function | function.radius-put-vendor-string | function.radius-put-vendor-int | function.radius-put-vendor-attr | function.radius-put-vendor-addr | function.radius-get-vendor-attr | function.qdom-tree | function.qdom-error | function.printer-start-doc | function.printer-end-doc | function.pdf-end-document | function.pdf-begin-document | function.odbc-do | function.newt-pop-window | function.newt-open-window | function.newt-grid-wrapped-window | function.newt-grid-wrapped-window-at | function.newt-grid-simple-window | function.newt-grid-basic-window | function.newt-centered-window | function.ncurses-wstandout | function.ncurses-standout | function.ncurses-panel-window | function.ncurses-doupdate | function.is-double | function.imagick-shadowimage | function.imagick-randomthresholdimage | function.imagick-newpseudoimage | function.imagegrabwindow | function.ifx-do | function.hwapi-insertdocument | function.hw-pipedocument | function.hw-output-document | function.hw-new-document | function.hw-insertdocument | function.hw-insdoc | function.hw-getchilddoccollobj | function.hw-getchilddoccoll | function.hw-free-document | function.hw-document-size | function.hw-document-setcontent | function.hw-document-content | function.hw-document-bodytag | function.hw-document-attributes | function.hw-docbyanchorobj | function.hw-docbyanchor | function.harudoc-usekrfonts | function.harudoc-usekrencodings | function.harudoc-usejpfonts | function.harudoc-usejpencodings | function.harudoc-usecntfonts | function.harudoc-usecntencodings | function.harudoc-usecnsfonts | function.harudoc-usecnsencodings | function.harudoc-setpermission | function.harudoc-setpassword | function.harudoc-setpagesconfiguration | function.harudoc-setpagemode | function.harudoc-setpagelayout | function.harudoc-setopenaction | function.harudoc-setinfodateattr | function.harudoc-setinfoattr | function.harudoc-setencryptionmode | function.harudoc-setcurrentencoder | function.harudoc-setcompressionmode | function.harudoc-savetostream | function.harudoc-save | function.harudoc-resetstream | function.harudoc-reseterror | function.harudoc-readfromstream | function.harudoc-output | function.harudoc-loadtype1 | function.harudoc-loadttf | function.harudoc-loadttc | function.harudoc-loadraw | function.harudoc-loadpng | function.harudoc-loadjpeg | function.harudoc-insertpage | function.harudoc-getstreamsize | function.harudoc-getpagemode | function.harudoc-getpagelayout | function.harudoc-getinfoattr | function.harudoc-getfont | function.harudoc-getencoder | function.harudoc-getcurrentpage | function.harudoc-getcurrentencoder | function.harudoc-createoutline | function.harudoc-construct | function.harudoc-addpagelabel | function.harudoc-addpage | function.gmp-random | function.fdf-add-doc-javascript | function.doubleval | function.dotnet-load | function.domxsltstylesheet-result-dump-mem | function.domxsltstylesheet-result-dump-file | function.domxsltstylesheet-process | function.domxml-xslt-version | function.domxml-xslt-stylesheet | function.domxml-xslt-stylesheet-file | function.domxml-xslt-stylesheet-doc | function.domxml-xmltree | function.domxml-version | function.domxml-open-mem | function.domxml-open-file | function.domxml-new-doc | function.domprocessinginstruction-target | function.domprocessinginstruction-data | function.domnode-unlink-node | function.domnode-set-namespace | function.domnode-set-name | function.domnode-set-content | function.domnode-replace-node | function.domnode-replace-child | function.domnode-remove-child | function.domnode-previous-sibling | function.domnode-prefix | function.domnode-parent-node | function.domnode-owner-document | function.domnode-node-value | function.domnode-node-type | function.domnode-node-name | function.domnode-next-sibling | function.domnode-last-child | function.domnode-is-blank-node | function.domnode-insert-before | function.domnode-has-child-nodes | function.domnode-has-attributes | function.domnode-get-content | function.domnode-first-child | function.domnode-dump-node | function.domnode-clone-node | function.domnode-child-nodes | function.domnode-attributes | function.domnode-append-sibling | function.domnode-append-child | function.domnode-add-namespace | function.domelement-tagname | function.domelement-set-attribute | function.domelement-set-attribute-node | function.domelement-remove-attribute | function.domelement-has-attribute | function.domelement-get-elements-by-tagname | function.domelement-get-attribute | function.domelement-get-attribute-node | function.domdocumenttype-system-id | function.domdocumenttype-public-id | function.domdocumenttype-notations | function.domdocumenttype-name | function.domdocumenttype-internal-subset | function.domdocumenttype-entities | function.domdocument-xinclude | function.domdocument-html-dump-mem | function.domdocument-get-elements-by-tagname | function.domdocument-get-element-by-id | function.domdocument-dump-mem | function.domdocument-dump-file | function.domdocument-document-element | function.domdocument-doctype | function.domdocument-create-text-node | function.domdocument-create-processing-instruction | function.domdocument-create-entity-reference | function.domdocument-create-element | function.domdocument-create-element-ns | function.domdocument-create-comment | function.domdocument-create-cdata-section | function.domdocument-create-attribute | function.domdocument-add-root | function.domattribute-value | function.domattribute-specified | function.domattribute-set-value | function.domattribute-name | function.dbplus-undoprepare | function.dbplus-undo | function.bindtextdomain | function.bind-textdomain-codeset | dotnet.setup | dotnet.resources | dotnet.intro | dotnet.installation | dotnet.constants | dotnet.configuration | domxpath.registernamespace | domxpath.query | domxpath.evaluate | domxpath.construct | domxml.setup | domxml.resources | domxml.installation | domxml.constants | domxml.configuration | domtext.splittext | domtext.iswhitespaceinelementcontent | domtext.construct | domprocessinginstruction.construct | domnotation.props | domnodelist.item | domnode.replacechild | domnode.removechild | domnode.normalize | domnode.lookupprefix | domnode.lookupnamespaceuri | domnode.issupported | domnode.issamenode | domnode.isdefaultnamespace | domnode.insertbefore | domnode.haschildnodes | domnode.hasattributes | domnode.clonenode | domnode.appendchild | domnamednodemap.item | domnamednodemap.getnameditemns | domnamednodemap.getnameditem | domimplementation.hasfeature | domimplementation.createdocumenttype | domimplementation.createdocument | domimplementation.construct | domexception.props | domentityreference.construct | domentity.props | domelement.setidattributens | domelement.setidattributenode | domelement.setidattribute | domelement.setattributens | domelement.setattributenodens | domelement.setattributenode | domelement.setattribute | domelement.removeattributens | domelement.removeattributenode | domelement.removeattribute | domelement.hasattributens | domelement.hasattribute | domelement.getelementsbytagnamens | domelement.getelementsbytagname | domelement.getattributens | domelement.getattributenodens | domelement.getattributenode | domelement.getattribute | domelement.construct | domdocumenttype.props | domdocumentfragment.appendxml | domdocument.xinclude | domdocument.validate | domdocument.schemavalidatesource | domdocument.schemavalidate | domdocument.savexml | domdocument.savehtmlfile | domdocument.savehtml | domdocument.save | domdocument.relaxngvalidatesource | domdocument.relaxngvalidate | domdocument.registernodeclass | domdocument.normalizedocument | domdocument.loadxml | domdocument.loadhtmlfile | domdocument.loadhtml | domdocument.load | domdocument.importnode | domdocument.getelementsbytagnamens | domdocument.getelementsbytagname | domdocument.getelementbyid | domdocument.createtextnode | domdocument.createprocessinginstruction | domdocument.createentityreference | domdocument.createelementns | domdocument.createelement | domdocument.createdocumentfragment | domdocument.createcomment | domdocument.createcdatasection | domdocument.createattributens | domdocument.createattribute | domdocument.construct | domcomment.construct | domcharacterdata.substringdata | domcharacterdata.replacedata | domcharacterdata.insertdata | domcharacterdata.deletedata | domcharacterdata.appenddata | domattr.isid | domattr.construct | dom.setup | dom.resources | dom.installation | dom.constants | dom.configuration | directoryiterator.isdot | control-structures.do.while | class.pdostatement | class.pdo | class.harudoc | class.dotnet | class.domxpath | class.domtext | class.domprocessinginstruction | class.domnotation | class.domnodelist | class.domnode | class.domnamednodemap | class.domimplementation | class.domexception | class.domentityreference | class.domentity | class.domelement | class.domdocumenttype | class.domdocumentfragment | class.domdocument | class.domcomment | class.domcharacterdata | class.domattr | book.sdodasrel | book.sdo | book.sdo-das-xml | book.qtdom | book.pdo | book.paradox | book.dotnet | book.domxml | book.dom |


Le PHP est une langue scripting d'usage universel employée couramment qui approprié particulièrement au développement de Web et peut être enfoncée dans le HTML. Si vous êtes nouveau au PHP et voulez avoir une certaine idée de la façon dont cela fonctionne, essayez le cours d'instruction d'introduction. Après ce, vérifiez le manuel en ligne, et l'exemple archivez les emplacements et certaines des autres ressources disponibles dans la section de liens.