Posted by Veikko Mδkinen on 06/17/05 18:12
J.O. Aho wrote:
> The Legend wrote:
>
>> -----
>> <tr>
>> <tr bgcolor="<?php echo"$tabletop"; ?>">
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.soort]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.titel]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.naam]</b>"; ?></td>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.bedrijfsnaam]</b>"; ?>
>> <td><?php echo"<font face=$b_fontface size=$b_fontsize
>> color=$Tlink>";
>> ?><?php echo"<b>$resultat[m.plaats]</b>"; ?>
>> </td>
>>
>> </tr>
>> ----
>
>
> $resultat[m.soort] isn't the fetched rows m.sort, but an undefined enum
> value, which results in a cell in the $resultat that is not there.
Wrong.
m.soort is not an undefined enum, but is treated as a constant. Luckily
PHP assumes the coder just forgot to write quotes if such a constant is
not found.
$ cat test.php
<?php
error_reporting(E_ALL|E_STRICT);
$a['a']= 'foo';
$b = $a[a];
?>
$ php test.php
Notice: Use of undefined constant a - assumed 'a' in /xxx/test.php on line 4
-veikko
--
veikko
mail@ .com
makinen
Navigation:
[Reply to this message]
|