Before beginning the while loop, just get the first line and do nothing with it. This way the logic to test if it’s the first line is not needed.
fgetcsv($file, 10000, ",");
while (($emapData = fgetcsv($file, 10000, ",")) !== FALSE) {
//....
}
More Related Contents:
- inserting information and image in php and mysql
- CodeIgniter – foreach loop
- I want to make my password to contain lowercase, uppercase, 8 characters and a character
- Project Links do not work on Wamp Server
- How to save a PNG image server-side, from a base64 data URI
- PHP Warning: PHP Startup: Unable to load dynamic library
- Using sessions & session variables in a PHP Login Script
- What is the “->” PHP operator called? [closed]
- How do I make this preg_match case insensitive?
- PHP session side-effect warning with global variables as a source of data
- Coalesce function for PHP?
- Is it necessary to declare PHP array before adding values with []?
- Explode a string to associative array without using loops? [duplicate]
- Getting HTTP code in PHP using curl
- What does a successful MySQL DELETE return? How to check if DELETE was successful?
- SQLSTATE[HY000] [2002] A connection attempt failed.. – When attempting to connect from Local to remote server
- PHP foreach by reference causes weird glitch when going through array of objects
- Keep Duplicates while Using array_diff
- mysqli query results to show all rows
- Fatal error: Declaration of .. must be compatible with .. PHP
- How can I echo the whole content of a .html file in PHP?
- How to define a Laravel route with a parameter that contains a slash character
- Paypal SandBox IPN always returns INVALID
- PHP Timezone List
- Which is faster? Constants, Variables or Variable Arrays
- In PHP, how do I generate a big pseudo-random number?
- Optional parameter in the middle of a route
- Access object property with disallowed character in property name
- Php & Sql Injection – UTF8 POC
- Sort a multidimensional array descending by subarray count and preserve first level keys