Update example.php to handle empty network case.