Friday, August 10, 2012

Re: Need Help

On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar <mohitkr05@gmail.com> wrote:
> How can i display the data in this format. [] are checkboxes
>
>
> Users Shift1 shift2 shift3 shift4
> user1 [] [] [] []
> user2 [] [] [] []
> user3 [] [] [] []
> user4 [] [] [] []
> user5 [] [] [] []
>

Is this something like what you are looking for?


<?php
echo "<table>";
foreach($users as $u) {
// output the users name here, as the first cell of a table, for example
echo "<tr><td>".$u['name']."</td>";
for($i=0; $i<5; $i++) {
// output the shifts here
echo "<td>[CODE FOR CHECKBOX]</td>";
}
// finish the row in the table
echo "</tr>";
}
echo "</table>";

Mike.

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate