Write the value of an array to the output in PHP

Description

The following code shows how to write the value of an array to the output.

Example


/*from w  w  w. j a va 2 s .  com*/
<?php
   $age=array("XML"=>"35");
   echo "XML is " . $age['XML'] . " years old.";
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions