Pulling value from an array with PHP to export to CSV
-
Am trying to figure out how to display one of two array values from a custom dropdown form field called “Sex” to an export to CSV. The values are “Male” and “Female” but this is what is exported in to the CSV:
a:1:{i:0;s:4:”Male”;}
a:1:{i:0;s:6:”Female”;}Yes, it is trivial to change these manually after exporting, but I want it to be simple for the client so they can just use a template in WP All Export Pro to run these exports periodically.
I’m not a PHP coder so have tried to modify code snippets I’ve found online and have gone through at least 25 of them thus far (and have about 6 hours invested) and none work.
Any ideas would sure be appreciated for using WP All Export Pro’s “Export the value returned by a PHP function” capability to export just the user’s selection of either “Male” or “Female” as values when running the export to CSV.
The topic ‘Pulling value from an array with PHP to export to CSV’ is closed to new replies.