PHP Programing language

adplus-dvertising
Which can create a program for changing a value in Array
Previous Home Next
<html>
 <head>
  <title>Changing array values</title>
 </head>
 <body>
 <?php
  $a = array( "Ram ", "Ramesh ", "Radha" );
  echo( $a[0] . $a[1] . $a[2] . "<hr>" );
  $a[0] = 10;
  $a[1] = 20;
  $a[2] = $a[0] + $a[1];
  echo( "$a[0] + $a[1] = $a[2]" );
 ?>
 </body>
</html>

Output:

Previous Home Next