| Autor | Zpráva | ||
|---|---|---|---|
| ajajaj Profil |
#1 · Zasláno: 13. 2. 2013, 16:20:45
$selecty[]=array($qqq=>$www);
if (! isset($a)) $a="xxx";
if ($a<>$row4['parid']){
if (is_array($selecty)){
foreach ($selecty as $subselecty){ $select="";
$select=array_search($row4["parid"],$subselecty);}
print "<h4>$select</h4>";
}
}
$a= $row4['parid']; |
||
| Jan Knížek Profil |
#2 · Zasláno: 13. 2. 2013, 21:57:32
Nejsem si jistý, ale nemělo by to být takto?
foreach ($selecty as $subselecty){ $select="";
$select=array_search($row4["parid"],$subselecty);
print "<h4>$select</h4>";} |
||
| ajajaj Profil |
ne, to právě ne, to by mi o vytisklo všechny H4 najednou, já to používám při procházení výsledků z db aby mi to nadepsalo <select> názvem, hodím sem celý kod...
...
$selecty[]=array($row3["zobrselect"]=>$row3["id"]);
....
$row3 id je stejný jako $row4 parid
while ($row4 = mysql_fetch_assoc($result4)) {
if (! isset($a)) $a="xxx";
if ($a<>$row4['parid']){ if ($a!=="xxx") print "</select>";
if (is_array($selecty)){
foreach ($selecty as $subselecty){
$select=array_search($row4["parid"],$subselecty);
}
print "<select>";
if ($select) print "<option disabled=\"disabled\" selected=\"selected\">$select</option>";
}
}
print "<option>".$row4["parametr"]."</option>";
$a= $row4["parid"];
} print "</select>";
}
//print_r ($selecty);voila! jedno kafe a je to... ;) foreach ($selecty as $subselecty){
$select=array_search($row4["parid"],$subselecty); if ($select) break;} |
||
| Jan Knížek Profil |
#4 · Zasláno: 14. 2. 2013, 18:14:10
Jsem rád, že se povedlo vyřešit :).
|
||
|
Časová prodleva: 13 let
|
|||
0