dlebowski Posted August 16, 2007 Share Posted August 16, 2007 I have not been able to figure out how to capture the column headings from a file on my web server in variables to be used in a .php script. For example. File Headers: ID, NAME, OCCUPATION, DATE I would like a script that would grab those headers in a file and store them in variables: $ID=ID $NAME=NAME $OCCUPATION=OCCUPATION $DATE=DATE Thank in advance. Quote Link to comment https://forums.phpfreaks.com/topic/65333-query-that-stores-column-headers-from-csv-file-in-variables/ Share on other sites More sharing options...
lemmin Posted August 16, 2007 Share Posted August 16, 2007 I've never used it but there is a string parser for something like that: http://www.php.net/manual/en/function.str-getcsv.php Quote Link to comment https://forums.phpfreaks.com/topic/65333-query-that-stores-column-headers-from-csv-file-in-variables/#findComment-326268 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.