delickate Posted December 17, 2008 Share Posted December 17, 2008 hello, i've a an array of text boxes.i'ld like to access only those textbox data that is filled by user. any body know how to get? Link to comment https://forums.phpfreaks.com/topic/137339-help-in-multiple-image/ Share on other sites More sharing options...
genericnumber1 Posted December 17, 2008 Share Posted December 17, 2008 for instance if you have multiple textboxes on one form with their name defined as "testbox[]" you could do... <?php foreach($_POST['testbox'] as &$testbox) { if(!empty($testbox)) { // do something } } ?> Link to comment https://forums.phpfreaks.com/topic/137339-help-in-multiple-image/#findComment-717556 Share on other sites More sharing options...
[email protected] Posted December 17, 2008 Share Posted December 17, 2008 Use if (strlen($array[value]) > 0) To determine if the field isn't empty. (Of course, replace $array with the array, and value with the value.) Link to comment https://forums.phpfreaks.com/topic/137339-help-in-multiple-image/#findComment-717560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.