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

Home » Imported messages » comp.lang.php » php+html mixup in displaying multidimensional array in html tables
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php+html mixup in displaying multidimensional array in html tables [message #176855 is a reply to message #176840] Sat, 28 January 2012 23:50 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 28.01.2012 12:24, schrieb John:
> Hello,
>
> I am new to this problem and shall be very grateful for any hint on how to a´void an
> unreadable code-salad, when trying to display a bidimensional array (thus with two
> indexes) on a html table.
> I refer to the continuous shifting between <?php and <html> every two lines.
>
> Is there a method which is 'quick an easy' to do the job ?
>

Quick and easy? Easy is what you know.

I am at times still shocked to see how popular CMSs written in PHP mix up HTML and PHP.

This is generally unmaintainable, un-designable.

For quick, go with the echo style proposed.

For the heavier lifting use a template system, once you know it it will be very easy.
This will help you separate code / application logic, and design.

Template systems produce in the end scripts with a mix of PHP and HTML, but this is
not the level you work on. And you can give your templates to a designer.

I am quite happy with Smarty 3.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fast/Easy way to extract a column from multi-dimensional array?
Next Topic: Freelance PHP Developer
Goto Forum:
  

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

Current Time: Sun Nov 10 08:16:25 GMT 2024

Total time taken to generate the page: 0.04129 seconds