Search

Showing 7 of 1,216 result(s)

/blog/2018/04/11/laravel-5-adding-or-setting-new-array-element-values-with-set#content-replacing-the-array-with-a-completely-different-type

Since the set function will give the $array whatever the $value is when the $key is null , the original type of the variable can be changed completely. For example, setting the $array to null: Setting the $array to 100 :

/blog/2018/04/11/laravel-5-adding-or-setting-new-array-element-values-with-set#content-global-arrayset-helper-function

The array_set function is a shortcut to calling Arr::set . This function is declared in the global namespace.

/blog/2018/04/11/laravel-5-checking-if-an-array-contains-an-element-with-has#content-example-use

Considering the following array: We can determine that the nested key actually does exist: Because the nested key key does in fact exist, the value of $doesExist would be true. Inversely, we can prove that a key of does_not_exist does not, in...

/blog/2018/04/11/laravel-5-checking-if-an-array-contains-an-element-with-has#content-global-arrayhas-helper-function

The array_has function is a shortcut to calling Arr::has . This function is declared in the global namespace.