PHP:在foreach循环中不保存的值

PHP Code:

$file = file_get_contents('example.com/index/');
$array = array();
preg_match_all('!href=\\"(/img/[0-9]+.jpg)\\"!u', $file, $array);
$results = array_unique($array[1]);

foreach ( $results as $value ) {
    $value = 'imgaes.example.com/' . $value;
    echo "$value
"; // imgaes.example.com/838.jpg
}

var_dump($results); // 838.jpg

Where is the error? I try make a little grabber. Its all details, i think.

Assign the value by reference:

foreach ( $results as &$value ){
  ...
}

unset($value);

or

foreach ( $results as $key => $value ) {
    $results[$key] = 'imgaes.example.com' . $value;
    echo "$value
"; // imgaes.example.com/img/838.jpg
}

var_dump($results);