Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. set_time_limit (300);
  3. require_once('config.php');  
  4.  
  5. // Import my CSV as an array
  6. $stats = file('stats.csv');
  7.  
  8. // Remove the first 4 lines. This will always be the same.
  9. $stats = array_slice($stats, 4);
  10.  
  11. // I need to find the index that contains '----------' and delete all the indexes after it.
  12.  
  13. $val = "--------------------------------------------------------------";
  14.  
  15. $key = array_search($val, $stats);
  16.  
  17. //No key is being shown?
  18.  
  19. var_dump($key);
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement