Generate 64K edges | PHP

April 8th, 2021 12:19:07 AM

					
<?php header('Content-Type:text/html'); $jsonData = json_decode(file_get_contents("names.json")); $namesArray = array(); foreach($jsonData as $data) { $namesArray[] = $data; } for($i = 0; $i < 64000; $i++) { echo 'D.add_edge("'. $namesArray[array_rand($namesArray)] . '", "' . $namesArray[array_rand($namesArray)]. '")'; echo "<br>"; } ?>

Featured Posts