• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
no output display in dropdown list

#4
(10-11-2018, 08:20 AM)Piotr Wrote: 2) Why you use four times <?php when you can use one?

Because for outputting text, dropping out of PHP parsing mode is generally more efficient than sending all of the text through echo or print. The larger the block of text the more significant the difference.

Because string concatenation creates a large number of temporary objects causing unnecessary use of the garbage collector. Both consume memory and can dramatically slow down script execution. Doing concatenation in loops seriously compounds these effects.

Because there is zero performance hit for dropping into and out of PHP parsing mode.

Because it's easier to write complex output without creating a lot of HTML and/or PHP syntax errors.

It is, more often than not, easier to comprehend. IOW, it's easier to read. Which is probably the most important reason.
Reply


Messages In This Thread
no output display in dropdown list - by kvanaraj - 10-11-2018, 04:35 AM
RE: no output display in dropdown list - by Piotr - 10-11-2018, 08:20 AM
RE: no output display in dropdown list - by dave friend - 10-11-2018, 11:09 AM
RE: no output display in dropdown list - by Piotr - 10-11-2018, 11:40 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.