48719181 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 48719181.php
- <?php
- $ComputerMapping[0]["PrinterName"] = "PRT01_Zentral";
- $ComputerMapping[0]["PrintServer"] = "DC01";
- $ComputerMapping[0]["isDefaultPrinter"] = 0;
- $ComputerMapping[1]["PrinterName"] = "PRT02_BH";
- $ComputerMapping[1]["PrintServer"] = "DC01";
- $ComputerMapping[1]["isDefaultPrinter"] = 1;
- $ComputerMapping[2]["PrinterName"] = "PRT03_EDV";
- $ComputerMapping[2]["PrintServer"] = "DC01";
- $ComputerMapping[2]["isDefaultPrinter"] = 0;
- $ComputerMapping[3]["PrinterName"] = "PRT04_GL";
- $ComputerMapping[3]["PrintServer"] = "DC01";
- $ComputerMapping[3]["isDefaultPrinter"] = 0;
- $UserMapping[0]["PrinterName"] = "PRT01_Zentral";
- $UserMapping[0]["PrintServer"] = "DC01";
- $UserMapping[0]["isDefaultPrinter"] = 0;
- $UserMapping[1]["PrinterName"] = "PRT02_BH";
- $UserMapping[1]["PrintServer"] = "DC01";
- $UserMapping[1]["isDefaultPrinter"] = 0;
- $UserMapping[2]["PrinterName"] = "PRT03_EDV";
- $UserMapping[2]["PrintServer"] = "DC01";
- $UserMapping[2]["isDefaultPrinter"] = 1;
- function array_merge_recursive_distinct( array &$array1, array &$array2 ) {
- $merged = $array1;
- foreach ($array2 as $key => &$value)
- {
- if (is_array($value) && isset($merged[$key]) && is_array($merged[$key]))
- {
- $merged[$key] = array_merge_recursive_distinct($merged[$key], $value);
- }
- else
- {
- $merged[$key] = $value;
- }
- }
- return $merged;
- }
- $Result = array_merge_recursive_distinct($ComputerMapping, $UserMapping);
- print_r ($Result);
File Description
- 48719181
- PHP Code
- 10 Feb-2018
- 1.4 Kb
You can Share it:
Latest PHP Pastes