Loop breaks on yes/no user input

I have a shell script, and its pretty much done, I decided to add a loop that ends or continues depending on user input. like "would you like to continue?" and if I hit y or yes it will run the loop again until I hit n or no and breaks out of the loop.

To be hones I didn't think I needed to add the scipt it since it was just simple if statement with user input.

echo "\n did you want to continue?:\n"
read ans
ansy="y"
ansn="n"
if [ "$ans"="$ansy" ]; then
         echo "\nYou are still in this loop"
else
         echo "\nYou broke free from the loop"
fi

Need to see the code.

ok, done.

---------- Post updated at 08:58 PM ---------- Previous update was at 04:31 PM ----------

Got it figured out this can be closed now.