Site Cloner PHP Script
Bargain Hunter PHP Script
Job Hunter PHP Script
Site Login and Access Control PHP Script

Adding a Variable Inside Array

With an array, you can use a variable to represent the value. The example below demonstrates a situation where a variable is used to display the days in the month.

$thirty_one = “Thirty one days in the month”;
$thirty = “Thirty days in the month”;
//$twenty_eight = “Twenty eight days in the month”;

        ”Jan” => $thirty_one,
        ”Feb” => 28,
        ”Mar” => $thirty_one,
        ”Apr” => $thirty,
        ”May” => $thirty_one,
        ”Jun” => $thirty,
        ”Jul” => $thirty_one,
        ”Aug” => $thirty_one,
        ”Sep” => $thirty,
        ”Oct” => $thirty_one,
        ”Nov” => $thirty,
        ”Dec” => $thirty_one