Posted by Andy Hassall on 05/21/05 17:54
On 21 May 2005 07:42:39 -0700, "macduder83" <adrian.pavelescu@gmail.com> wrote:
>I have modified my PHP.ini file so that it reports E_ALL, even the
>notices. I wanted to see everything. Question is how do I declare a
>variable... bare with me, Im new to PHP.
Variables aren't declared in PHP, at least not separately from initialisation.
Assign a value to the variable before you attempt to read any values from it.
<?php
print $x; // produces a warning
?>
<?php
$x = 1;
print $x; // no warning
?>
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
[Back to original message]
|