test - 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 test.php
- <?php
- $arrIcon = [
- 'metapolicy_struct' => [0 => '0']
- ];
- $hotelData = [
- 'metapolicy_struct' => [
- 0 => '0',1 => '1',2 => '2',3 => '3',4 => '4',
- ]
- ];
- if (isset($hotelData['metapolicy_struct'])){
- $i = 0;
- $metapolicy_struct = [];
- foreach ($hotelData['metapolicy_struct'] as $k => $item) {
- if (array_search($k, $arrIcon['metapolicy_struct']) === false){
- echo $k . " NO <br/>";
- $metapolicy_struct[] = trim($k);
- }else{
- echo $k . "YES <br/>";
- }
- $i++;
- }
- $arrIcon['metapolicy_struct'] = $metapolicy_struct;
- }
- var_dump($arrIcon);
File Description
- test
- PHP Code
- 11 Jan-2023
- 696 Bytes
You can Share it:
Latest PHP Pastes