logoalt Hacker News

direwolf20today at 2:50 PM2 repliesview on HN

That's basically the design of PHP with different syntax. <?for($i=0;$i<1;$i++){?> <html></html> <?}?>

Nobody uses PHP this way any more though — people treat it like Python or Node and write the entire codebase inside a big <? block

JSP is similar with different syntax again — nobody uses JSP either

I think ASP too but I never used that


Replies

jraphtoday at 2:52 PM

You could have some client side JavaScript handle your for nodes as well. That's how I imagined what OP described actually.

> Nobody uses PHP this way any more though

Well… I have bad news.

I do, for one :-)

show 1 reply
radicalethicstoday at 3:32 PM

If HTML was never able to be the full solution, then I guess if I had to expand on where I'm going, then what the heck are we even doing with this html thing? Either MAKE IT like PHP, ditch it, or do something, anything.

show 1 reply