how to display list of checkboxes in 5 by 5 format

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saif_in
Forum Newbie
Posts: 2
Joined: Sun May 16, 2010 4:15 pm

how to display list of checkboxes in 5 by 5 format

Post by saif_in »

hi there im a newbie and new to this forum and need the help from this community to solve my issue i have a function which displays checkboxes but it is not formatted properly it is come one by one and grouped together
plz help me with the proper logic code to arrange the list of checkboxes in 5/5 format my current code which is not displaying the layout of the checkboxes properly is :

Code: Select all

function checkBoxList( &$arr, $tag_name, $tag_attribs, $selected=null, $key='value', $text='text', $porlinea=false ) 
	{
	   reset( $arr );
	   $html = "";
	   for ($i=0, $n=count( $arr ); $i < $n; $i++ ) {
		
		  $k = $arr[$i]->$key;
		  $t = $arr[$i]->$text;
		  $id = @$arr[$i]->id;
plz reply me with the proper logic code to display these checkboxes in a proper format of 5/5
Last edited by Benjamin on Wed May 19, 2010 5:24 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
_64k
Forum Newbie
Posts: 16
Joined: Thu Nov 12, 2009 8:52 am

Re: how to display list of checkboxes in 5 by 5 format

Post by _64k »

please post the whole function
Post Reply