## Attn: Robert ->Numberplates

Your message from yesterday:<BR><BR>&#062;Say I Have a number plate called <BR>&#062;1008 EL <BR>&#062;I don&#039;t really understand the Len function <BR>&#062;Can I write it out like this <BR><BR>&#062; &#060;img src="../numbers/&#060;%=mid(fp_rs("Number"),1,1)%&#062;.gif"&#0 62; <BR>&#062; &#060;img src="../numbers/&#060;%=mid(fp_rs("Number"),2,1)%&#062;.gif"&#0 62; <BR>&#062; &#060;img src="../numbers/&#060;%=mid(fp_rs("Number"),3,1)%&#062;.gif"&#0 62; <BR>&#062; &#060;img src="../numbers/&#060;%=mid(fp_rs("Number"),4,1)%&#062;.gif"&#0 62; <BR>&#062; &#060;img src="../numbers/&#060;%=mid(fp_rs("Number"),5,1)%&#062;.gif"&#0 62; <BR><BR>This routine is correct, but now you are doing it with fixed string length. To correct this you should use a small loop, e.g.<BR><BR>dim x<BR>for x = 1 to 5<BR> response.write "&#060;img src=&#039;../numbers/"&mid(fp_rs("Number"),x,1)&".gif&#039;&#062;"<BR>n ext <BR><BR>The x will then replace the numbers from 1 to 5<BR>But when we want variable length, we need te replace 5 with the length of the string. We get that by using the len() function.<BR>For example : len("test") gives you 4<BR>So you use :<BR><BR>for x = 1 to len(fp_rs("Number"))<BR><BR>The space is a bit trickier, but will work...<BR>You need to test in the loop wether it is a space or a normal alphanumeric character.<BR>so your definite loop would be then :<BR><BR>dim x<BR>for x = 1 to len(fp_rs("Number"))<BR> if mid(fp_rs("Number") &#060;&#062; " " then<BR> response.Write "&#060;img src=&#039;../numbers/"&mid(fp_rs("Number"),x,1)&".gif&#039;&#062;"< BR> else<BR> response.write "&#060;img src=&#039;../numbers/space.gif&#039;&#062;" <BR> end if<BR>next <BR><BR>This will filter out all spaces, and convert them to the gif you created that represents a space.<BR>