Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yeh i got the ans..</p> <pre><code>&lt;?php $fp = fopen("google12.csv", 'r'); $fileHeader = array(); $firstRow = array(); $index = 0; while (($data = fgetcsv($fp)) !== FALSE &amp;&amp; $index != 2) { $data = preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&amp;-]/s', '', $data); // add line if ($index == 0) $fileHeader = $data; elseif ($index == 1) $firstRow = $data; $index++; } fclose($fp); $parameter = array("header" =&gt; $fileHeader,"firstRow" =&gt; $firstRow); echo json_encode($parameter); exit; ?&gt; </code></pre> <p>Out-put :</p> <pre><code>{"header":["Name","Given Name","Additional Name","Family Name","Yomi Name","Given Name Yomi","Additional Name Yomi","Family Name Yomi","Name Prefix","Name Suffix","Initials","Nickname","Short Name","Maiden Name","Birthday","Gender","Location","Billing Information","Directory Server","Mileage","Occupation","Hobby","Sensitivity","Priority","Subject","Notes","Group Membership","E-mail 1 - Type","E-mail 1 - Value","E-mail 2 - Type","E-mail 2 - Value","E-mail 3 - Type","E-mail 3 - Value","IM 1 - Type","IM 1 - Service","IM 1 - Value","Phone 1 - Type","Phone 1 - Value","Phone 2 - Type","Phone 2 - Value","Phone 3 - Type","Phone 3 - Value","Address 1 - Type","Address 1 - Formatted","Address 1 - Street","Address 1 - City","Address 1 - PO Box","Address 1 - Region","Address 1 - Postal Code","Address 1 - Country","Address 1 - Extended Address","Address 2 - Type","Address 2 - Formatted","Address 2 - Street","Address 2 - City","Address 2 - PO Box","Address 2 - Region","Address 2 - Postal Code","Address 2 - Country","Address 2 - Extended Address","Organization 1 - Type","Organization 1 - Name","Organization 1 - Yomi Name","Organization 1 - Title","Organization 1 - Department","Organization 1 - Symbol","Organization 1 - Location","Organization 1 - Job Description","Relation 1 - Type","Relation 1 - Value","Relation 2 - Type","Relation 2 - Value","Relation 3 - Type","Relation 3 - Value","Relation 4 - Type","Relation 4 - Value","Relation 5 - Type","Relation 5 - Value","Website 1 - Type","Website 1 - Value","Website 2 - Type","Website 2 - Value","Website 3 - Type","Website 3 - Value","Website 4 - Type","Website 4 - Value","Website 5 - Type","Website 5 - Value","Website 6 - Type","Website 6 - Value","Website 7 - Type","Website 7 - Value"],"firstRow":["Alpesh Vaghasiya","Alpesh","","Vaghasiya","","","","","","","","","","","1986-09-16","","","","","","","","","","","","Facebook MobilePhone All Office My Contacts"," Home","mealpeshvaghasiya.com","Other","alpeshartoongames.com","Work","alpeshvaghasiya7gmail.com","","","","Mobile","9727056565","","","","","Home","Surat"," Gujarat"]} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload