Hướng dẫn php in hindi
Learn PHPPHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. Show PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. Start learning PHP now » Easy Learning with "PHP Tryit"With our online "PHP Tryit" editor, you can edit the PHP code, and click on a button to view the result. Example
echo "My first PHP script!"; Try it Yourself » Click on the "Try it Yourself" button to see how it works. PHP ExercisesPHP ExamplesLearn by examples! This tutorial supplements all explanations with clarifying examples. See All PHP Examples PHP Quiz TestLearn by taking a quiz! This quiz will give you a signal of how much you know, or do not know, about PHP. Start PHP Quiz! My LearningTrack your progress with the free "My Learning" program here at W3Schools. Log into your account, and start earning points! This is an optional feature, you can study W3Schools without using My Learning. PHP ReferencesW3Schools' PHP reference contains different categories of all PHP functions, keywords and constants, along with examples. Kickstart your careerGet certified by completing the course Get certified w3schoolsCERTIFIED.2022PHP मे Decision Making Statements विभिन्न कार्यों के आधार पर विभिन्न प्रकार के कार्यों को करने के लिए उपयोग किया जाता है. इसमे if, elseif ...else और Switch Statements का उपयोग अलग Condition मे Decision Making के लिए किया जाता है. आप अपने Decision लेने के लिए Code में Conditional Statements का उपयोग कर सकते हैं. PHP Three Decision Making Statements को Supports करता है.
If...Else StatementIf...Else Statement कुछ Code को Executes करता है यदि कोई Condition True है और दूसरे Code मे अगर वह Condition False है तो हम if...else Statement का उपयोग करते है.
OutputHave a nice day! ElseIf Statementअगर आप कुछ Code को Executes करना चाहते हैं और कई Conditions में से एक सही है तो आप elseif Statement का उपयोग कर सकते है.
OutputHave a nice day! Switch StatementSwitch Statement का उपयोग Execute किये जाने वाले Code के कई Block को Select करने के लिए किया जाता है.
OutputToday is Saturday PHP Articles in HindiDecision making स्टेटमेंट्स का उपयोग करके प्रोग्राम को अलग अलग condition के अनुसार execute कराया जा सकता है। PHP में decision making statements निम्न है।
1) ifइसे simple if भी कहते है, अगर इसमें दी हुई condition true होती है तब ही इसका code block(statements) execute होगा। Syntax
Example
2) if elseif में दी हुई condition अगर true होगी तो if के statements execute होगा अगर false हुआ तब ही else के statements execute होंगे। else में condition कभी उपयोग नहीं किया जाता है। else हमेशा end में ही use किया जाता है। Syntax
3) if else ifअगर प्रोग्राम में एक से अधिक conditions को check कर statements execute कराने के लिए उपयोग किया जाता है। Syntax
Example
if else if में जितनी बार चाहे उतनी बार उपयोग कर सकते है और else हमेशा आखरी में ही use होगा, ये optional होता है use कर भी सकते है और नहीं भी। 4) switchswitch भी if else if की तरह multiple कंडीशन चेक करता है । Syntax
Example
Switch कैसे काम करता है ?switch में label में दी हुई वैल्यूज को दिए हुए वैल्यू के साथ मैच करता है, जो label मैच होता है उसके statements एक्सेक्यूट होते है और break keyword का उपयोग स्टेटमेंट्स के execution के बाद स्विच से control को बहार transfer करना होता है। अगर कोई भी लेबल मैच नहीं होता तब default ब्लॉक के स्टेटमेंट्स execute होते है और यह ऑप्शनल है (use कर सकते है और नहीं भी) |