<?php
$count = 1;
foreach($_SESSION["searchmultipleTSIKDO"] as $key=>$rows) {
echo '<tr><td>'.$count++.'.</td>';
echo '<td>'.$rows["key"].'</td>';
echo '<td>';
if ( $rows["key"] == 'bcounty') {
$array = $listcounty->get("WHERE id = $rows[value]");
foreach($array as $rows1) {
echo $rows1["name"];
}
}
else if ( $rows["key"] == 'gender') {
if ( $rows["value"] == 1) {
echo 'Male';
} else {
echo 'Female';
}
}
else if ( $rows["key"] == 'dob') {
.......
}
}
else if ( $rows["key"] == 'qualification') {
$array = $listqualification->get("WHERE id = $rows[value]");
foreach($array as $rows1) {
echo $rows1["name"];
}
}
else {
echo $rows["value"];
}
echo '</td>';
echo "<td><a href=\"report.php?deletesearchmultiple=$key\" style='color: red;'> X</a></td>";
}
?>
Asked
Active
Viewed 245 times
-3

u_mulder
- 54,101
- 5
- 48
- 64

Sherab Gyatso
- 1
- 1
-
3And what is the question here? – u_mulder Jan 07 '20 at 08:56
-
@u_mulder I think OP want the code that code here: `else if ( $rows["key"] == 'dob') { ....... } ` – mplungjan Jan 07 '20 at 08:59
1 Answers
0
You mean something like
else if ( $rows["key"] == 'dob') {
echo '<label>DOB: <input type="date" value="'.date("Y-m-d\TH:i:s",$rows["value"]).'" /></label>';
}

mplungjan
- 169,008
- 28
- 173
- 236
-
Label is already there, when i chose the dob label, i need to have option to select the date. – Sherab Gyatso Jan 07 '20 at 10:56
-
1I have no idea what you mean. There is no label on your code where you have ....... – mplungjan Jan 07 '20 at 11:05
-
1Please provide only relevant code and show an example of expected output - it is now completely unclear what you want – mplungjan Jan 07 '20 at 11:12
-
-
Mr mplungjan, Thank you for your reply. I am new to stackoverflow community. so i cant put more than one question for today. Above is the code for label selection. – Sherab Gyatso Jan 07 '20 at 11:21
-
Please update existing code instead of posting code in a comment - it is still not clear what you want. – mplungjan Jan 07 '20 at 11:36