I am stuck with PHP's array()? -


Why did the array () function pass in? I'm unable to understand the array () function. I know that $ _POST does not have any value, it passes under the array () , but what is the value in array () ?

  some functions ($ _ POST? $ _POST: array ());  

array () is not a function copy, it A language is formed. But simply by using the array () you can prepare an empty array for you, which is with zero elements.

You might want to check for:

  issued ($ _ POST)? $ _POST: Array ()  

Edit:

As told by Greg, $ _ POST will always be set. So there is no need to check it and return an empty array. someFunc ($ _ POST) must do the same thing.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -