Mailinglisten-Archive |
hi!
> und nu zu einem beispiel was das ganze veranschaulicht:
>
> $spalte2="Hallo";
> $a="spalte";
> $b="2";
> $c=$a.$b;
> echo($$c);
>
>
> >while ($m <= $spalten) {
> > $m++;
> > echo(" <td width=\"$spalte$m\"> </td>\n");
> > ^^^^^^^^^
erstmal danke für den tipp. jetzt wird aber folgender code ausgegeben:
<tr>
<td width="100"> </td>
<td width="$spalte2"> </td>
<td width="$spalte3"> </td>
<td width="$spalte4"> </td>
<td width="$spalte5"> </td>
<td width="$spalte6"> </td>
<td width="$spalte7"> </td>
</tr>
es sollen aber die werte und nicht die variablennamen ausgegeben werden.
hier noch mal das script:
for ($m = 2; $m <= $spalten; $m++) {
$a = "spalte";
$b = "$m";
$c = $a.$b;
echo(" <td width=\"$$c\"> </td>\n");
}
echo(" </tr>\n");
Matthias
--
HTML- & Webdesign-Tipps _(at)_ http://www.mk2000-online.de
Fragen und eMails an mailto:mk_(at)_mk2000-online.de
php::bar PHP Wiki - Listenarchive