First, no need for $ch, $ch2, $ch3. As you execute inline like that, you can recycle each variable, you no longer need the previous value so let the next one overwrite it.
With that in mind,
<?php
//
$urls = Array(
'http://www.example.com/',
'http://www.example2.com/'
'http://www.example3.com/'
);
//
foreach ($urls as $url) {
$ch = curl_init($url);
curl_exec($ch);
curl_close($ch);
}
?>
If there are specific actions for each url, like stored in different files, etc., use an associative array instead.
<?php
//
$urls = Array(
'example.txt' => 'http://www.example.com/',
'example2.txt' => 'http://www.example2.com/'
'example3.txt' => 'http://www.example3.com/'
);
//
foreach ($urls as $text=>$url) {
$ch = curl_init($url);
curl_exec($ch);
curl_close($ch);
// Stoe $ch in $text
}
?>
Of course, in this case it's as easy to build '', "2", and "3" on the fly, but you get the point . . . ) Take it one step further, if there's tons of URL's, read them from a database or a delimited text file to build the arrays, just easier to maintain.