Showing 7 of 1,216 result(s)
In the introduction of this section, we saw this example code: We could do the same thing using the wrap method like so: The Arr::wrap method will not do anything to the input $value if it is already an array. We can round this section out by...
The array_wrap helper function is a shortcut to calling Arr:wrap . This function is declared in the global namespace.
The signature of the except method is:
The following examples assume that the $_POST super-global contains the following information: We could easily get all the information except for the password like so: $inputData would then contain the following items: When passing a single item,...
The array_except function is a shortcut to calling Arr::except . This function is declared in the global namespace.
The signature of the only method is:
The only helper method is the logical opposite of the except method. Using the same $_POST array from the previous example, we could retrieve only a user's first name like so: With the resulting array looking like this: