Problem iterating through PATH entries with spaces

I have a Bash script on Cygwin that tries to iterate through the directory entries in PATH. I need to convert the PATH value to a form that I can iterate through with "for var in $list; do".

For instance, an excerpt from my PATH value is this:

:/c/Program Files/Windows Imaging/:/c/Program Files/MySQL/MySQL Server 5.1/bin

I need to somehow coerce this into something I can iterate through, where each original PATH entry goes into a variable.

I tried replacing " " (space) with "\ " (escaped space). That seems correct, but I also have to replace ":" (colon) with " " (space). I also tried replacing ":" with "\n", but that doesn't seem to help. Inside the "for" loop, the value of "var" never includes the full directory name, it always breaks at spaces in the names.

---------- Post updated at 04:40 PM ---------- Previous update was at 04:22 PM ----------

Duh. Never mind. I discovered "IFS=$':'". Very simple.

$ echo ":/c/Program Files/Windows Imaging/:/c/Program Files/MySQL/MySQL Server 5.1/bin" | tr ":" "\n" | sed '/^$/d' | while read line; do
> echo "$line"
> done
/c/Program Files/Windows Imaging/
/c/Program Files/MySQL/MySQL Server 5.1/bin
$ 

Please let me know if this would have worked for you?

Make an array

declare -a arr
arr=$(echo $PATH | tr -s ':' ' )
echo $PATH | awk -F: '{ for (i=1; i<=NF; i++) {print $i}}' |
while read fname
do 
# something
done
oldIFS="$IFS"
IFS=':'
for i in $PATH
do
    
    echo $i
done 
IFS="$oldIFS"