{"id":3749,"date":"2013-08-31T05:50:41","date_gmt":"2013-08-30T19:50:41","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3749"},"modified":"2013-08-31T05:50:41","modified_gmt":"2013-08-30T19:50:41","slug":"csv-read-to-html-via-php-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/csv-read-to-html-via-php-primer-tutorial\/","title":{"rendered":"CSV Read to HTML via PHP Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/CSVtoHTML\/getcsv.php?delim= &#038;infile=xxx.csv\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSV Read to HTML via PHP Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/CSVtoHTML\/CSV_to_HTML_via_PHP.jpg\" title=\"CSV Read to HTML via PHP Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSV Read to HTML via PHP Primer Tutorial<\/p><\/div>\n<p>Welcome to the CSV Read to HTML via PHP Primer Tutorial.<\/p>\n<p>Here is a link to some downloadable PHP programming source code which you might like to rename to <a target=_blank title='getcsv.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/CSVtoHTML\/getcsv.php_GETME'>getcsv.php<\/a><\/p>\n<p>A related topic which could extend or augment this tutorial is about uploading files, which we will discuss at another time.<\/p>\n<p>Here we take the first two columns as data to create an HTML Select tag.   At the same time we collect into a global Javascript variable all the column data into the HTML required to create a Table element.<\/p>\n<p>The CSV import technique is to use PHP&#8217;s file_get_contents() function, which you can read about <a target=_blank title='file_get_contents' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'>here<\/a>.<\/p>\n<p>This other <a target=_blank title='useful tutorial' href='http:\/\/stackoverflow.com\/questions\/8442830\/open-excel-file-and-export-to-json'>tutorial<\/a> was inspirational for the construction of this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/CSVtoHTML\/getcsv.php?delim= &#038;infile=xxx.csv\" title=\"CSV Read to HTML via PHP Primer Tutorial\">posting<\/a>, so, thanks.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3749' onclick='var dv=document.getElementById(\"d3749\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=64#content\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3749' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the CSV Read to HTML via PHP Primer Tutorial. Here is a link to some downloadable PHP programming source code which you might like to rename to getcsv.php A related topic which could extend or augment this tutorial &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/csv-read-to-html-via-php-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,12,37],"tags":[283,292,603,932,997,1319],"class_list":["post-3749","post","type-post","status-publish","format-standard","hentry","category-data-integration","category-elearning","category-tutorials","tag-csv","tag-data-integration-2","tag-import-html","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3749"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=3749"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3749\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=3749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=3749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=3749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}