SlideShare ist ein Scribd-Unternehmen logo
1 von 24
calling all operator
FORM ,[object Object],[object Object],[object Object],[object Object],[object Object],User (web browser) Web Server Enter data and the data are sent to Php script engine Passes data Process the data Give response or output
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],<html> <head> </head> <body> <form action=&quot;message.php&quot; method=&quot;post&quot;>  Enter your message: <input type=&quot;text&quot; name=&quot;msg&quot; size=&quot;30&quot;>  <input type=&quot;submit&quot; value=&quot;Send&quot;>  </form>  </body> </html>
[object Object],<html>  <head></head> <body>  <?php  // retrieve form data  $input  =  $_POST [ 'msg' ];  // use it  echo  &quot;You said: <i>$input</i>&quot; ;  ?>  </body>  </html>
operator ,[object Object]
 
Comparison operator <?php  /* define some variables */ $mean  =  9 ;  $median  =  10 ;  $mode  =  9 ;  // less-than operator  // returns true if left side is less than right  // returns true here  $result  = ( $mean  <  $median );  print  &quot;result is $result<br />&quot; ;
// greater-than operator  // returns true if left side is greater than right  // returns false here  $result  = ( $mean  >  $median );  print  &quot;result is $result<br />&quot; ;  // less-than-or-equal-to operator  // returns true if left side is less than or equal to right  // returns false here  $result  = ( $median  <=  $mode );  print  &quot;result is $result<br />&quot; ;
// greater-than-or-equal-to operator  // returns true if left side is greater than or equal to right  // returns true here  $result  = ( $median  >=  $mode );  print  &quot;result is $result<br />&quot; ;  // equality operator  // returns true if left side is equal to right  // returns true here  $result  = ( $mean  ==  $mode );  print  &quot;result is $result<br />&quot; ;
[object Object],// not-equal-to operator  // returns true if left side is not equal to right  // returns false here  $result  = ( $mean  !=  $mode );  print  &quot;result is $result<br />&quot; ;  // inequality operator  // returns true if left side is not equal to right  // returns false here  $result  = ( $mean  <>  $mode );  print  &quot;result is $result&quot; ;  ?>
=== operator <?php  /* define two variables */ $str  =  '10' ;  $int  =  10 ;  /* returns true, since both variables contain the same value */  $result  = ( $str  ==  $int );  print  &quot;result is $result<br />&quot; ;  /* returns false, since the variables are not of the same type even though they have the same value */  $result  = ( $str  ===  $int );  print  &quot;result is $result<br />&quot; ;   /* returns true, since the variables are the same type and value */  $anotherInt  =  10 ;  $result  = ( $anotherInt  ===  $int );  print  &quot;result is $result&quot; ;  ?>
Logical operator ,[object Object],<?php  /* define some variables */ $auth  =  1 ;  $status  =  1 ;  $role  =  4 ;  /* logical AND returns true if all conditions are true */  // returns true  $result  = (( $auth  ==  1 ) && ( $status  !=  0 ));  print  &quot;result is $result<br />&quot; ;
/* logical OR returns true if any condition is true */  // returns true  $result  = (( $status  ==  1 ) || ( $role  <=  2 ));  print  &quot;result is $result<br />&quot; ;  /* logical NOT returns true if the condition is false and vice-versa */  // returns false  $result  = !( $status  ==  1 );  print  &quot;result is $result<br />&quot; ;  /* logical XOR returns true if either of two conditions are true, or returns false if both conditions are true */  // returns false  $result  = (( $status  ==  1 ) xor ( $auth  ==  1 ));  print  &quot;result is $result<br />&quot; ;  ?>
Conditional statement ,[object Object],[object Object],[object Object],if ( expression ) { statement }
[object Object],<html>  <head></head> <body>  <form action=&quot;ageist.php&quot; method=&quot;post&quot;>  Enter your age: <input name=&quot;age&quot; size=&quot;2&quot;>  </form>  </body>  </html>
ageist.php <html>  <head></head> <body>  <?php  // retrieve form data  $age  =  $_POST [ 'age' ];  // check entered value and branch  if ( $age  >=  21 ) {       echo  'Come on in, we have alcohol and music awaiting you!' ;  }  if ( $age  <  21 ) {       echo  &quot;You're too young for this club, come back when you're a little older&quot; ;  }  ?>  </body>  </html>
[object Object],[object Object],if (condition) {      do this!      }  else {      do this!  }
[object Object],<html>  <head></head> <body>  <?php  // retrieve form data  $age  =  $_POST [ 'age' ];  // check entered value and branch  if ( $age  >=  21 ) {      echo  'Come on in, we have alcohol and music awaiting you!' ;      }  else {      echo  &quot;You're too young for this club, come back when you're a little older&quot; ;  }  ?>  </body>  </html>
Ternary operator ,[object Object],<?php  if ( $numTries  >  10 ) {        $msg  =  'Blocking your account...' ;      }  else {       $msg  =  'Welcome!' ;  }  ?>
[object Object],<?php  $msg  =  $numTries  >  10  ?  'Blocking your account...'  :  'Welcome!' ;  ?>
Nested if ,[object Object],<?php  if ( $day  ==  'Thursday' ) {      if ( $time  ==  '0800' ) {          if ( $country  ==  'UK' ) {               $meal  =  'bacon and eggs' ;          }      }  }  ?>   <?php  if ( $day  ==  'Thursday'  &&  $time  ==  '0800'  &&  $country  ==  'UK' ) {       $meal  =  'bacon and eggs' ;  }  ?>
<html>  <head></head> <body>  <h2>Today's Special</h2>  <p>  <form method=&quot;get&quot; action=&quot;cooking.php&quot;>  <select name=&quot;day&quot;>  <option value=&quot;1&quot;>Monday/Wednesday  <option value=&quot;2&quot;>Tuesday/Thursday  <option value=&quot;3&quot;>Friday/Sunday  <option value=&quot;4&quot;>Saturday  </select>  <input type=&quot;submit&quot; value=&quot;Send&quot;>  </form>  </body>  </html>
<html> <head></head> <body>  <?php  // get form selection  $day  =  $_GET [ 'day' ];  // check value and select appropriate item  if ( $day  ==  1 ) {       $special  =  'Chicken in oyster sauce' ;      }  elseif ( $day  ==  2 ) {       $special  =  'French onion soup' ;      }  elseif ( $day  ==  3 ) {       $special  =  'Pork chops with mashed potatoes and green salad' ;      }  else {       $special  =  'Fish and chips' ;  }  ?>  <h2>Today's special is:</h2>  <?php  echo  $special ;  ?>  </body> </html>

Weitere ähnliche Inhalte

Was ist angesagt?

07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboardsDenis Ristic
 
02 Php Vars Op Control Etc
02 Php Vars Op Control Etc02 Php Vars Op Control Etc
02 Php Vars Op Control EtcGeshan Manandhar
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQLkalaisai
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisIan Macali
 
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)Kana Natsuno
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottO'Reilly Media
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPwahidullah mudaser
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop NotesPamela Fox
 

Was ist angesagt? (20)

07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards
 
Php string function
Php string function Php string function
Php string function
 
02 Php Vars Op Control Etc
02 Php Vars Op Control Etc02 Php Vars Op Control Etc
02 Php Vars Op Control Etc
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQL
 
Basic PHP
Basic PHPBasic PHP
Basic PHP
 
PHP variables
PHP  variablesPHP  variables
PHP variables
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Operators in PHP
Operators in PHPOperators in PHP
Operators in PHP
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
 
Data Types In PHP
Data Types In PHPData Types In PHP
Data Types In PHP
 
Basic of PHP
Basic of PHPBasic of PHP
Basic of PHP
 
PHP Basic
PHP BasicPHP Basic
PHP Basic
 
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
 
Php
PhpPhp
Php
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
 
Php mysql
Php mysqlPhp mysql
Php mysql
 

Andere mochten auch

Andere mochten auch (20)

Php Simple Xml
Php Simple XmlPhp Simple Xml
Php Simple Xml
 
Php String And Regular Expressions
Php String  And Regular ExpressionsPhp String  And Regular Expressions
Php String And Regular Expressions
 
Php Sq Lite
Php Sq LitePhp Sq Lite
Php Sq Lite
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Json
JsonJson
Json
 
Javascript
JavascriptJavascript
Javascript
 
Oop in php_tutorial
Oop in php_tutorialOop in php_tutorial
Oop in php_tutorial
 
Hash
HashHash
Hash
 
Prototype Utility Methods(1)
Prototype Utility Methods(1)Prototype Utility Methods(1)
Prototype Utility Methods(1)
 
Object
ObjectObject
Object
 
Php Sessoins N Cookies
Php Sessoins N CookiesPhp Sessoins N Cookies
Php Sessoins N Cookies
 
Optimizing spatial database
Optimizing spatial databaseOptimizing spatial database
Optimizing spatial database
 
Php Using Arrays
Php Using ArraysPhp Using Arrays
Php Using Arrays
 
Php Error Handling
Php Error HandlingPhp Error Handling
Php Error Handling
 
Rest Essentials
Rest EssentialsRest Essentials
Rest Essentials
 
Spatial index(2)
Spatial index(2)Spatial index(2)
Spatial index(2)
 
Chapter 3 Consumer Behaviour
Chapter 3 Consumer BehaviourChapter 3 Consumer Behaviour
Chapter 3 Consumer Behaviour
 
Theory Of Consumer Behavior
Theory Of Consumer BehaviorTheory Of Consumer Behavior
Theory Of Consumer Behavior
 
Introduction To Macro Economics
Introduction To Macro EconomicsIntroduction To Macro Economics
Introduction To Macro Economics
 
Microeconomics: Utility and Demand
Microeconomics: Utility and DemandMicroeconomics: Utility and Demand
Microeconomics: Utility and Demand
 

Ähnlich wie Php Calling Operators (20)

Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Php Basic Security
Php Basic SecurityPhp Basic Security
Php Basic Security
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Php Training
Php TrainingPhp Training
Php Training
 
Web development
Web developmentWeb development
Web development
 
Intro to #memtech PHP 2011-12-05
Intro to #memtech PHP   2011-12-05Intro to #memtech PHP   2011-12-05
Intro to #memtech PHP 2011-12-05
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
Working with Web Services
Working with Web ServicesWorking with Web Services
Working with Web Services
 
PHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the GoodPHP 102: Out with the Bad, In with the Good
PHP 102: Out with the Bad, In with the Good
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for Designers
 
JQuery 101
JQuery 101JQuery 101
JQuery 101
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
Form Processing In Php
Form Processing In PhpForm Processing In Php
Form Processing In Php
 
Phpvsjsp
PhpvsjspPhpvsjsp
Phpvsjsp
 
03 Php Array String Functions
03 Php Array String Functions03 Php Array String Functions
03 Php Array String Functions
 
Further Php
Further PhpFurther Php
Further Php
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 

Mehr von mussawir20

Mehr von mussawir20 (16)

Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
 
Php Oop
Php OopPhp Oop
Php Oop
 
Php My Sql
Php My SqlPhp My Sql
Php My Sql
 
Php File Operations
Php File OperationsPhp File Operations
Php File Operations
 
Javascript Oop
Javascript OopJavascript Oop
Javascript Oop
 
Html
HtmlHtml
Html
 
Object Range
Object RangeObject Range
Object Range
 
Date
DateDate
Date
 
Prototype js
Prototype jsPrototype js
Prototype js
 
Template
TemplateTemplate
Template
 
Class
ClassClass
Class
 
Element
ElementElement
Element
 
Position
PositionPosition
Position
 
Timedobserver
TimedobserverTimedobserver
Timedobserver
 
Enumerable
EnumerableEnumerable
Enumerable
 
Event
EventEvent
Event
 

Kürzlich hochgeladen

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Php Calling Operators

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.  
  • 8. Comparison operator <?php /* define some variables */ $mean = 9 ; $median = 10 ; $mode = 9 ; // less-than operator // returns true if left side is less than right // returns true here $result = ( $mean < $median ); print &quot;result is $result<br />&quot; ;
  • 9. // greater-than operator // returns true if left side is greater than right // returns false here $result = ( $mean > $median ); print &quot;result is $result<br />&quot; ; // less-than-or-equal-to operator // returns true if left side is less than or equal to right // returns false here $result = ( $median <= $mode ); print &quot;result is $result<br />&quot; ;
  • 10. // greater-than-or-equal-to operator // returns true if left side is greater than or equal to right // returns true here $result = ( $median >= $mode ); print &quot;result is $result<br />&quot; ; // equality operator // returns true if left side is equal to right // returns true here $result = ( $mean == $mode ); print &quot;result is $result<br />&quot; ;
  • 11.
  • 12. === operator <?php /* define two variables */ $str = '10' ; $int = 10 ; /* returns true, since both variables contain the same value */ $result = ( $str == $int ); print &quot;result is $result<br />&quot; ; /* returns false, since the variables are not of the same type even though they have the same value */ $result = ( $str === $int ); print &quot;result is $result<br />&quot; ; /* returns true, since the variables are the same type and value */ $anotherInt = 10 ; $result = ( $anotherInt === $int ); print &quot;result is $result&quot; ; ?>
  • 13.
  • 14. /* logical OR returns true if any condition is true */ // returns true $result = (( $status == 1 ) || ( $role <= 2 )); print &quot;result is $result<br />&quot; ; /* logical NOT returns true if the condition is false and vice-versa */ // returns false $result = !( $status == 1 ); print &quot;result is $result<br />&quot; ; /* logical XOR returns true if either of two conditions are true, or returns false if both conditions are true */ // returns false $result = (( $status == 1 ) xor ( $auth == 1 )); print &quot;result is $result<br />&quot; ; ?>
  • 15.
  • 16.
  • 17. ageist.php <html> <head></head> <body> <?php // retrieve form data $age = $_POST [ 'age' ]; // check entered value and branch if ( $age >= 21 ) {      echo 'Come on in, we have alcohol and music awaiting you!' ; } if ( $age < 21 ) {      echo &quot;You're too young for this club, come back when you're a little older&quot; ; } ?> </body> </html>
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. <html> <head></head> <body> <h2>Today's Special</h2> <p> <form method=&quot;get&quot; action=&quot;cooking.php&quot;> <select name=&quot;day&quot;> <option value=&quot;1&quot;>Monday/Wednesday <option value=&quot;2&quot;>Tuesday/Thursday <option value=&quot;3&quot;>Friday/Sunday <option value=&quot;4&quot;>Saturday </select> <input type=&quot;submit&quot; value=&quot;Send&quot;> </form> </body> </html>
  • 24. <html> <head></head> <body> <?php // get form selection $day = $_GET [ 'day' ]; // check value and select appropriate item if ( $day == 1 ) {      $special = 'Chicken in oyster sauce' ;     } elseif ( $day == 2 ) {      $special = 'French onion soup' ;     } elseif ( $day == 3 ) {      $special = 'Pork chops with mashed potatoes and green salad' ;     } else {      $special = 'Fish and chips' ; } ?> <h2>Today's special is:</h2> <?php echo $special ; ?> </body> </html>