Learning PHP and MySQL

Example 03-20 Using a constant in your program

<?php
define
("HELLO",  "Hello  world!");
echo  
HELLO;  //  outputs  "Hello  world."
?>

Outputs:

Hello world!

Posted by on 07/19 at 03:56 PM

Next entry: Example 3-21 Echoing the line and file predefined constants for a script called predefined_constants

Previous entry: Example 03-19 Combining a string and a number

<< Back to main