<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic load csv in select in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/load-csv-in-select/m-p/1061622#M54343</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm beginner in Intel XDK. I'm trying to write my first app, helping with examples and tutorials.&lt;/P&gt;

&lt;P&gt;I would like to load a csv file into a select. In PHP I write so:&lt;/P&gt;

&lt;PRE class="brush:php;"&gt;        $file=plugin_dir_url(__FILE__).'coefficienti.csv';
        $delimitatore=";";
        if (($fp = fopen($file,"r")) !== false){
            // for each row of file
            while (($data = fgetcsv($fp,1000,$delimitatore)) !== false) {
                //insert row into select
                $echo .= "&amp;lt;option value='".$data[1]."|".$data[0]."'&amp;gt;".$data[0]."&amp;lt;/option&amp;gt;";
                }
            fclose($fp);
        }
        $opzioniEta=$echo;&lt;/PRE&gt;

&lt;P&gt;Now, how can I convert this in Js, to add in app.js file?&lt;/P&gt;

&lt;P&gt;I'm using Xdk 3900 on Windows 7.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Luca&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 10:23:33 GMT</pubDate>
    <dc:creator>Luca_P_</dc:creator>
    <dc:date>2017-03-21T10:23:33Z</dc:date>
    <item>
      <title>load csv in select</title>
      <link>https://community.intel.com/t5/Software-Archive/load-csv-in-select/m-p/1061622#M54343</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm beginner in Intel XDK. I'm trying to write my first app, helping with examples and tutorials.&lt;/P&gt;

&lt;P&gt;I would like to load a csv file into a select. In PHP I write so:&lt;/P&gt;

&lt;PRE class="brush:php;"&gt;        $file=plugin_dir_url(__FILE__).'coefficienti.csv';
        $delimitatore=";";
        if (($fp = fopen($file,"r")) !== false){
            // for each row of file
            while (($data = fgetcsv($fp,1000,$delimitatore)) !== false) {
                //insert row into select
                $echo .= "&amp;lt;option value='".$data[1]."|".$data[0]."'&amp;gt;".$data[0]."&amp;lt;/option&amp;gt;";
                }
            fclose($fp);
        }
        $opzioniEta=$echo;&lt;/PRE&gt;

&lt;P&gt;Now, how can I convert this in Js, to add in app.js file?&lt;/P&gt;

&lt;P&gt;I'm using Xdk 3900 on Windows 7.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Luca&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 10:23:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/load-csv-in-select/m-p/1061622#M54343</guid>
      <dc:creator>Luca_P_</dc:creator>
      <dc:date>2017-03-21T10:23:33Z</dc:date>
    </item>
    <item>
      <title>This forum is not about</title>
      <link>https://community.intel.com/t5/Software-Archive/load-csv-in-select/m-p/1061623#M54344</link>
      <description>&lt;P&gt;This forum is not about teaching how to write JavaScript and communicate with a server. For that you are better served by the many JavaScript enthusiast sites on the Internet. Especially HTML5rocks and W3CSchools and Stack Overflow.&lt;/P&gt;

&lt;P&gt;The XDK creates a standard Cordova CLI app (aka PhoneGap), so solutions that work with Cordova also work with the XDK.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 16:04:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/load-csv-in-select/m-p/1061623#M54344</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2017-03-21T16:04:05Z</dc:date>
    </item>
  </channel>
</rss>

