v2.5.2
Giriş yap

<textarea> ile her satıra farklı değer girip değerleri arka planda diziye alma

mahmutoz
787 defa görüntülendi

textarea'ya girilen değerleri satır satır alıp bir dizide nasıl tutabilirim?

Cevap yaz
Cevaplar (6)
qplot
1805 gün önce

nl2br kullan


$al=nl2br($_POST['sites']);	
	
	
$bol=explode("<br />", $al);	
	
	
print_r($bol);

mahmutoz
1805 gün önce

oldu hocam elinize sağlık çok teşekkür ederim.

mahmutoz
1805 gün önce

düz textarea hocam

<textarea name="sites" id="" cols="55" rows="5"></textarea>

şu şekilde de aldım bir işe yaramadı.

$a = isset($_POST['sites']) ? $_POST['sites'] : '';
$x = array_map('trim',array_filter(explode('<br>',$a)));
var_dump($x);
qplot
1805 gün önce

ckditor vs mi kullanıyorsun yoksa duz textarea mı

mahmutoz
1805 gün önce

Hocam br etiketi işe yaramıyor maalesef \n de denedim olmadı :/

qplot
1805 gün önce

explode ile ayıra bilirsin

$parcala=explode("<br>", $yazi);

print_r($parcala);