Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $fp = fopen("counter.txt", "r"); // Открываем файл в режиме чтения
- if ($fp)
- {
- while (!feof($fp))
- {
- $mytext = fgets($fp, 999);
- $pieces = explode(' ', $mytext);
- for ($i=0; $i <count($pieces) ; $i++)
- {
- if (($i%2) == 0) {
- $mas = $pieces[$i];
- echo $mas." ";
- }
- }
- }
- }
- else echo "Ошибка при открытии файла";
- fclose($fp);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement