This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Arrays

Change Value

array(3) {
  [0]=>
  string(5) "Volvo"
  [1]=>
  string(17) "Ford"
  [2]=>
  string(6) "Toyota"
}
<?php
// define array $cars
$cars = array("Volvo", "BMW", "Toyota"); 

// change the second item to Ford
$cars[1] = "Ford";

// display the new array
var_dump($cars);
?>

Note: the character length of item [1] should be 4. I added <mark> and </mark> to the code to highlight item [1]. This increased the character length of item [1] to 17.