I'm confused here. I have a script that reads in the values from a .csv file. No problem there. One of the field is a cost field and in the .csv file it has a dollar sign in front of it. ($x.xx)
So I used str_replace on that field to get a number, BUT when I try to use that number in a simple division statement, it won't work.
ie:
$cost = str_replace("$", "", $data[$cost_column]);
$clicks = 10;
$cost_per_click = $cost/$clicks;
But this will not divide, it's like it thinks the $cost variable is not a number.
Help?