I have a varchar value in a MySQL table column as follows:
"23,45,50"
however, some columns may look like:
"33,21"
or just "29".
I need to parse out each value and divide each value by 10 and casting it as an integer so as to eliminate the decimal. Also assign a variable to each. For example,
$a=2;
$b=4;
$c=5;
Finally, I need to add all values and get a total. For example,
$d=11;
That's it! These numbers are examples and may vary.
I have messed with this for a while. Please help!
Thanks!