PHP: Convert CSV String to a Pretty Assoc Array

Sometimes you find yourself with a CSV string (not a file on the filesystem), and you d like to use str_getcsv to get an array, but the results are sloppy and not at all friendly to work with. Reading from a file on the filesystem is more memory-friendly, but sometimes that just isn t the situation you have. If you think this applies to you, check out the following function. It creates an assoc…