<?php $urls = [ 'https://google.com/', 'https://bing.com/' ]; $names = [ 'Google', 'Bing' ]; $combined = array_map( fn($url, $name) => ['url' => $domain, 'name' => $name], $urls, $names ); echo(json_encode($combined));
You have javascript disabled. You will not be able to edit any code.