<?xml version="1.0" encoding="windows-1250"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <meta http-equiv="Content-type" content="text/html; charset=windows-1250" /> <title>Pierwszy skrypt php</title> </head> <body> <?php $x = 2015; $j = 0; $t = 10; //liczba następnych dni matki których dni tygodnia chce wypisać $i = 2015 + $t; function dni_matki($t) { while($x < $i) { $x++; $j++; } return $dzien_matki; } dni_matki($t); for($a = 0; $a < $t; $a++) ?> </body> </html>
Błędy: Notice: Undefined variable: i in E:\xamp\htdocs\komunikat.php on line 19
Notice: Undefined variable: x in E:\xamp\htdocs\komunikat.php on line 19
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 25
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Notice: Undefined variable: dzien_matki in E:\xamp\htdocs\komunikat.php on line 32
Wydaje mi się że 10 ostatnich jest spowodowanych tymi poprzednimi bo pętle for chyba dobrze zapisałem.
Pozdrawiam i proszę o pomoc.