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 #176858 is a reply to message #176857] Sun, 29 January 2012 14:43 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
r(dot)mariotti(at)fdcx(dot)net wrote:

> After developing numerus commercial sites over the past decade+ all
> the php I've created is by far mostly procedural. I personally never
> leave php and output my pages with a "print <<<EOD" and the entire
> page follows, variaables embededded and all.
> Easy to create, read, follow, maintain, etc.

Except when you want to indent or client-side validate your code. As for
the former, the EOD (or whatever delimiter you use) must be at the
*beginning of the line* and must at most followed by `;'. As for the
latter, a client-side HTML validator will not see the HTML that you put out
because to it it is PHP.

In addition, you still would have string escaping issues and difficulties
with function calls, and it is very inefficient to have PHP string-parse
large chunks of code that does not need parsing in the first place.

< http://php.net/manual/en/language.types.string.php#language.types.string.sy ntax.heredoc>

BTDT. Here-doc is tempting as a solution to this problem, but in the long
run it is more trouble than it is worth.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
[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: Fri Sep 20 04:37:42 GMT 2024

Total time taken to generate the page: 0.04283 seconds