This tutorial explains how to modify existing values in a PHP array. It’s pretty simple – all you need to do is refer to the array and its index and then change that index’s value with another value.
Watch the video below and then scroll down to see the sample code.
Sample PHP code:
// create a simple array with 12 elements inside it
$months = array("January","February","March","April","May","June","July","August","September","October","November","December");
// change the value of the second element in the array
$months = "Feb";
// return the value of the second element in the arrray
This tutorial explains how to create horizontal lists and use list items as links in order to create a horizontal navigation bar. The result will look like the image below. You could then go and add some CSS styling to turn this into a nicely themed navigation bar.
Watch the video below (or click here to watch it on YouTube) and then scroll down to see the code.