All pastes #89550 Raw Edit

Unnamed

public text v1 · immutable
#89550 ·published 2006-07-16 13:00 UTC
rendered paste body
<html>
<head>
</head>
<body>
<?php

	
	$tekens = array('','a','b');
	
	function genereer($tekens, $start, $aantaltekens) {
  if($aantaltekens == 0) {
     echo '<div>'.$start.'</div>';
     return;
  }
  foreach($tekens as $t) {
     genereer($tekens, $start.$t, $aantaltekens-1);
  }
}
genereer($tekens, '', 3);
?>
</body>
</html>

/*
tekens means characters, aantaltekens means number of chars, genereer means generate.

i want the number of the generated string before the string itself, and is should be seperate (i should be able to put things inbetween etc)
*/