FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How best to print an array to table?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How best to print an array to table? [message #178254 is a reply to message #178252] Fri, 25 May 2012 02:19 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Fri, 25 May 2012 00:51:24 +0200, Michael Fesser wrote:

> .oO(richard)
>
>> Ok so here's the quick and dirt simple code:
>>
>> <?php
>>
>> $Alist=array (
>>
>> "cover"=>"images/A/A001.jpg",
>> "aname"=>"The A Team",
>> "bname"=>"An Empty Glass",
>> "artist"=>"SSgt Barry Sadler",
>> "avideo"=>"A",
>> "bvideo"=>"b",
>> "label1"=>"[US] RCA Victor",
>> "label2"=>"UK] RCA",
>> "adate"=>"4-23-66"
>> );
>>
>> print "<table border='1'>";
>> print "<tr>";
>> print "<td>hello</td>";
>> print "</tr>";
>> print "</table>";
>>
>> ?>
>>
>> I want to replace "hello" with $Alist "aname".
>> How is that done correctly in this instance?
>
> print "<td>{$Alist['aname']}</td>";
>
> Curly syntax
> http://www.php.net/manual/en/language.types.string.php#language.types.strin g.parsing.complex
>
> Micha

Does not work in this case.
www.1littleworld.net/sample/test2.php
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem setting Date field in MySQL
Next Topic: What is this attack trying to do?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Jul 03 07:47:57 GMT 2024

Total time taken to generate the page: 0.04480 seconds