On Thu, 24 May 2012 22:19:21 -0400, richard wrote:
> On Fri, 25 May 2012 00:51:24 +0200, Michael Fesser wrote:
>> print "<td>{$Alist['aname']}</td>";
Perhaps you could show us the php you used, rather than link us to a
website that only shows us the results of that php.
The code suggested will work if you type it correctly. If you don't type
it correctly, eg miss out or change bits, it won't work.
Note for example, that:
The normal use may be $array["key"] or $array['key']
To be used inside a string delimited with "" needs the use of of '' for
the array key:
$array['key']
the whole $array['key'] has to be enclosed in the curly brackets:
{$array['key']}
Then it can be included in a string that is enclosed in double quotes:
print "{$array['key']}";
which can also include other text:
print "<td>{$array['key']}</td>";
Which bit did you fuck up? No $ symbol? Didn't use the curly brackets?
Put the curly brackets in the wrong places? Used the same quotes for the
array key as the string? Got the array name or key name wrong?
Here's an example of it working:
http://www.sined.co.uk/tmp/array_print.php
Using this php (irrelevant bits snipped):
$array = array( "cold"=>"penguin" );
$content .= "<p>The value of \"{\$array['cold']}\" is: \"{$array['cold']}
\"</p>";
Rgds
Denis McMahon