string revering fails

Consider the following code

#!\bib\bash

echo -n "Enter string : "
read str
l=`expr length "$str"`
while [ "$l" -gt 0 ]
do
    echo -e `echo $str | cut -c"$l"`"\c"
        l=`expr "$l" - 1`
done
echo

the above code works perfect for string with no space in between. but fails when there is a space.

How can this be done ???

Maybe this is an acceptable alternative:

echo "asit india"| rev
aidni tisa

I want to do this using shell scripting