PHP array_walk() functionThe array_walk( ) function is an inbuilt function of PHP. It is used to apply a user supplied function to every element of an array. This function was introduced in 4.0. SyntaxParameters
Return ValuesThe array_walk( ) function returns true on success or false on failure. Example 1Output: The key a has the value youtube The key b has the value google The key c has the value whatsapp Example 2Output: Javatpoint tutorial1 has php Javatpoint tutorial2 has java Javatpoint tutorial3 has python Example 3Output: cricket and sachin have been paired together. hockey and sandeep have been paired together. Example 4Output: The key a has the value aajtak. The key b has the value zee news. The key c has the value ndtv.
Next TopicPHP Array Functions
|