<?php if(isset($_POST["submit"])) { echo count($_POST["to_more"]); } ?> <form name="f1" method="post"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="submit" name="submit" value="OK"> </form>
count(array_filter($_POST["to_more"]));
<?php if(isset($_POST["submit"])) { $c = 0; foreach($_POST["to_more"] as $single) if(!empty($single) || $single !== "") ++$c; echo $c; } ?> <form name="f1" method="post"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="submit" name="submit" value="OK"> </form>
<?php function notempty($val){ return !empty($val); } if(isset($_POST["submit"])) { echo count(array_filter($_POST["to_more"],"notempty")); } ?> <form name="f1" method="post"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="text" name="to_more[]"> <input type="submit" name="submit" value="OK"> </form>
$to_more = array("","second","third","",""); function notempty($val){ return !empty($val); } echo count(array_filter($to_more,"notempty"));
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง