The following is a test snippet piece of code from a script. This snippet is supposed to split a list of urls from the urls' description and remove the urls scheme (http, https) if present. Here is the code:
///test urls NOTE "|" separates url form the urls description
$inputuri = <<<URLS|description1|description1|description2|description3

echo "<pre>".$inputuri ."</pre><br />";

$inputuri_exp = explode("\r", $inputuri);//explodes inputuri for multipe urls

foreach($inputuri_exp as $value)
		$value_exp = explode("|", $value);//explodes value to get url and description

		$url = strtolower($value_exp[0]);//url value

		$descr = $value_exp[1];//url description

		$url_parsed = parse_url($url);//url parsed to get scheme

		$scheme = $url_parsed['scheme'];//set scheme to variable

		//removes url scheme from $urls variable if present
		if(stripos($url, $scheme) === FALSE)
				$url = $url;//does not contain a scheme like http or https

				$url = substr($url, strlen($scheme) + 3);//contains a scheme adds 3 characters for ://
		echo $url. "::". $descr. "<br />";

I expect the output to be:
But instead it is what is below. Notice how the second "" and "" still have their schemes' (http://)? It seems after going through the foreach loop once the scheme is not found in the url even if present. I have been racking my brain for hours. What have I done wrong?