Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Exemple et utilisation des assignation


{filelink=15091}

<html>
 <head>
  <title>Assignment Operators</title>
 </head>
 <body>
<?php

  $val1=6;
  $val2=8;
  $a = "Apprendre "; $aa = "PHP";
  $a .= $aa;

  $b = $val2; $bb = $val1;
  $b += $bb;

  $c = 7.5; $cc = 2.25;
  $c -= $cc;

  $d = $val2; $dd = $val1;
  $d *= $dd;

  $e = $val2; $ee = $val1;
  $e /= $ee;

  $f = $val2; $ff = $val1;
  $f %= $ff;

  $result =  "$aa Additionner et Assigner d'une chaîne: $a<br/>";
  $result .= "$bb Additionner et Assigner d'un nombre entier: $b<br/>";
  $result .= "$cc Soustraire et Assigner d'un nombre flottant: $c<br/>";
  $result .= "$dd Multiplier et Assigner: $d<br/>";
  $result .= "$ee Diviser et Assigner: $e<br/>";
  $result .= "$ff Modulo et Assigner: $f<br/>";
  echo( $result );

?>

 </body>
</html>

No comments yet.

Leave a Comment