I ran into an issue with a data feed I need to import where for some reason the feed producer has decided to provide data that should clearly be either INT or FLOAT as strings– like this:
$CASES_SOLD = "THREE";
$CASES_STOCKED = "FOUR";
Is there a way in PHP to interpret the text string as the actual integer?
EDIT: I should be more clear– I need to have the $cases_sold etc. as an integer– so I can then manipulate them as digits, store in database as INT, etc.
Use an associative array, for example: