Created
September 24, 2018 09:05
-
-
Save samuelguebo/edc76418afd34ae2aa1557bd9d9b0ccd to your computer and use it in GitHub Desktop.
Array of 5000 Spanish Sentences Sorted from Easiest to Hardest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rawUrl = "https://pastebin.com/raw/fjmQKxnQ"; | |
$rawText = file_get_contents($rawUrl); | |
$lines = preg_split("/\r\n|\n|\r/", $rawText); | |
$lines_count = count($lines); | |
$output = array(); | |
$i = 0; | |
for($j = 0; $j<$lines_count; $j++){ | |
if($j==$i){ | |
if($j+1<$lines_count){ | |
$output[] = array('es' => $lines[$i], 'en' => $lines[$i+1]); | |
$i = $i+5; | |
} | |
} | |
} | |
print_r($output); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment