HTML PHP put a cell under a specific header according to query -


I have different tasks under various departments. The Department's name and ID table header ( & lt; th & gt;

Gt; ). I have displayed them

Now I ask for work and if the work is concerned, then the department should have it and lt; Th id = 'a' & gt; and if the work department should be done in Department B & lt; Th id = 'B' & gt; .

My problem is that some departments can not work for this particular line and the room should be empty. If there is a value in the next cell, then when necessary, to tell the HTML to make an empty call, I want to do something like this:

  if (yes id == 'deptA' and ResultSet.deptId = 'DeptA') then & lt; Td & gt; ResultSet (i); & Lt; / TD & gt; Second & lt; Td & gt; & Lt; / TD & gt;   

I'm a little new to HTML and PHP All help is greatly appreciated. How to:

  & lt ;;   

Php echo '& lt; Table & gt; '; Foreign (...) {echoing '& lt; Tr & gt; & Lt; Td & gt; '; If (id == 'Department' and & quot; Result DeptId == 'DeptA') {Result Echo Results (i); } Echo & lt; / Td & gt; & Lt; Td & gt; '; If (eg ID == 'Department' & Result DeptId == 'DeptB') {Reset Reset (i); } Echo & lt; / Td & gt; & Lt; / Tr & gt; '; } Echo '& lt; / Table & gt; '; ? & Gt;

& lt; Table & gt; - table & lt; Tr & gt; - a table row & lt; Td & gt; / Code> - a table column

Comments