Merhaba arkadaşlar veritabanından çekilen mesajları her 30 karakterde bir alt satıra düşmesini istiyorum.
<?php
$guno = time();
mysql_query("INSERT INTO `mafya_chat` ( `id` , `username` , `mesaj` , `tarih` ) VALUES ('', '$username', '$text', '$guno')");
?>Bu şekilde birşey denedim fakat olmadı
<?php
include_once "includes/db_connect.php";
extract($_POST);
$guno = time();
$_SAY = chunk_split($text,30,"<br>");
if ($_SAY < 30){
if($text){
mysql_query("INSERT INTO `mafya_chat` ( `id` , `username` , `mesaj` , `tarih` ) VALUES ('', '$username', '$text', '$guno')");
}
}else{
$response_array['status'] = 'error';
}
?> chunk_split fonksiyonunu nasıl kullanabilirim ?