Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'functions.php';
- //$myfile = fopen("skaiciai.txt", "r");
- //while (!feof($myfile)) {
- // $data = fgets($myfile);
- // $string = preg_replace('/[^0-9]/', '', $data);
- // $skc = getNums(str_split($string));
- //}
- //
- //echo "<br>";
- //echo "<br>";
- //echo "<br>";
- //echo "<br>";
- //
- ////print_r($arr1);
- //var_dump();
- //
- //printNumbers($skc);
- //$myfile = fopen("skaiciai.txt", "r");
- //$max = 0;
- //while (!feof($myfile)) {
- // $line = fgets($myfile);
- // if ($line !== "\n") {
- // $sk = array();
- // $sk = explode(" ", $line);
- // $max += max($sk);
- //
- // }
- // else {
- //
- // echo "{$max}<br>";
- // $max = 0;
- //
- //
- // }
- //
- //
- //}
- //
- //echo "{$max}<br>";
- //
- //
- //}
- //$myfile = fopen("skaiciai.txt", "r");
- ////while (!feof($myfile)) {
- // $didza = array();
- // $sk = file_get_contents("skaiciai.txt" , "/n");
- // print_r($sk);
- // foreach($sk as $did){
- // $didza[] = explode($did, " ");
- // $max = max($didza[]);
- // print_r($max);
- // }
- ////
- //echo "<br>";
- //echo "<br>";
- //echo "<br>";
- //echo "<br>";
- //
- //
- //
- //}
- //function sort($arr) {
- // $skc = array();
- //
- // foreach ($arr as $obj) {
- // rsort($skc);
- // }
- //
- // print_r($skc);
- //}
- //
- //fclose($myfile);
- $mas = array(array("city", "Kaunas"), array("city", "Vilnius"),
- array("city", "Klaipeda"),
- array("city", "Alytus"),
- array("city", "Birstonas"),
- array("city", "Panevezys"),
- );
- //foreach($mas as $x => $x_value) {
- // foreach($mas as $x_value => $x_x_value) {
- // echo $x_x_value . "<br>";
- //
- //}
- //}
- $len = count($mas);
- for ($i = 0 ; $i < $len; $i++) {
- for ($col = 0; $col < $len; $col++){
- echo $mas[$i][$col]. "<br>";
- }
- }
- //$len = count($mas);
- //for ($row = 0; $row < $len; $row++) {
- //
- // for ($col = 0; $col < 3; $col++) {
- // echo "<li>".$mas[$row][$col]."</li>";
- // }
- //
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement