# \[mx\] string.substring to variable?

**URL:** <https://forum.kirupa.com/t/mx-string-substring-to-variable/33271>\
**Category:** flash\
**Created:** [October 17, 2003, 5:43am UTC](https://forum.kirupa.com/t/mx-string-substring-to-variable/33271 "2003-10-17T05:43:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radicaljugnu](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@radicaljugnu](https://forum.kirupa.com/u/radicaljugnu)\
**Post date:** [October 17, 2003, 5:43am UTC](https://forum.kirupa.com/t/mx-string-substring-to-variable/33271/1 "2003-10-17T05:43:14Z")

</div>

Does anyone know how to use string.substring to get a letter out of a string and get info from a variable of the name of that letter.  
like-\>

text1=“Kartik”  
for(i=0;i\<text1.length;i++){  
letter=text1.substring(i,i+1)

}

I know the above code won’t work, but it’s just an example.
