Home > Article > Backend Development > Use of php return
让 Today, the technical manager suddenly asked the PHP script to write a query to judge and return the data. After the data was found, how did you return?
Because I was not packaged into a function, I felt that I could not use Return; after that, I checked it. A personal summary: (1) return is mainly used in functions. Its main function is to return the results/resources/parameters processed by the function to the calling location , return expression // Return an expression result c), return // Return directly, or return a null value val) this way.The above introduces the use of php return, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.