Yazdığım kod şurada:
include('haberler.php');
$i = 1;
while ($i <= 5){
echo "$haber{$i}
";
echo "$haber{$i}
";
$i++;
}
?>
Beni istediğim şu. Döngü her döndüğünde $haber1 $haber2 $haber3 diye değişkenleri çağırsın. Ancak hata veriyor değişken bulunamadı diye.
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 13
1
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 14
1
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 13
2
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 14
2
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 13
3
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 14
3
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 13
4
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 14
4
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 13
5
Notice: Undefined variable: haber in C:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\index.php on line 14
5
Nasıl bir yöntem izlemeliyim yetkili abilerden cevap bekliyorum. İyi forumlar.