Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //в файле числа 0 1 2 3 4 5 6 7 8 9 10 11 12
- $chislas = file_get_contents('hotdogs.txt');
- if($chislas!='') {
- $chislar = explode(' ',$chislas); $newchislas='';
- foreach($chislar as $key => $val) {
- if( $val & 1) $newchislas .= '0 ';
- else $newchislas .= $val.' ';
- }
- file_put_contents('hotdogs.txt',$newchislas);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement