Recursively Difference Two Arrays

Use the array_diff_assoc_recursive() method to recursively differentiate two arrays:

array_diff_assoc_recursive($arrayOne, $arrayTwo);
Technical Details
$arrayOne = ['a' => "a1", 'c' => "d1"];

$arrayTwo = ['a' => "a2", 'b' => "b2"];

array_diff_assoc_recursive($arrayOne, $arrayTwo);
['c' => "d1"]

I18n Lang

Use the i18n_lang() method to translate a locale into a readable string e.g. "English":

i18n_lang('en_US');

Array Variable Export with Squares

Use the var_export_with_array_squares() method to var_exportopen in new window arrays using square notation:

var_export_with_array_squares($array)
Technical Details

Parameters:

  • array: An array that contains the data for export.
  • return: Optional boolean that determines if the result should be printed (false) or returned (true). Default is false.
Last Updated:
Contributors: sirthxalot