<?php

function lookAndSay($str) {

	return preg_replace_callback('

		return strlen($matches[0]).$matches[1];
	}, $str);
}

$num = ;

foreach(range(1,10) as $i) {

	echo $num.;
	$num = lookAndSay($num);
}

?>