Javascript assign Object Property to variable (ES6)
var result = {data:'test'};
var {data} = result
// console.log(data) // "test"
PHP assign array property to varaible
https://supunkavinda.blog/php-list
Your profile data is stuck in an indexed array ($profile). You know that each index is your name, age and the university respectively. So, now, you are going to break it into 3 variables for ease.
Okay, if you had 5 variables, 5 lines. We need a better solution!
list() function language construct
list() is a language construct in PHP, which can be used for array destructuring.
Array destructuring is breaking an array into variables
No comments:
Post a Comment