Complete PHP Array Reference. The foreach loop though iterates over an array of elements, the execution is simplified and finishes the loop. It bolds array values. Version: (PHP 4 and above) Syntax: print_r(var_name, return_output) with that, we will implement what is difference between implode and explode in PHP. PHP print statement can be used to print the string, multi-line strings, escaping characters, variable, array, etc. Tags: array, php array, sort array, create array, print array, array length. // replace something like '[element] => (' with ...