View Single Post
 
Old January 22nd, 2004, 05:28 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

This is happening because you aren't quoting your array indice..

Quote:
quote:
if ($font[type]) echo "FACE=$font[type] ";
if ($font['type']) echo "FACE=$font[type] ";

The conditional expression will accept the code, in PHP if you do not quote an associative array indice the program looks for a defined constant by that name, if none are found the program issues a notice level error and assumes it to be the string literal.

http://www.php.net/manual/en/language.types.array.php

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::