Possiedo un codice di questo tipo:
codice:
<tr>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
Homepage</td>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
[img]layout/freccia_menu.gif[/img]</td>
</tr>
<tr>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
Archivio News</td>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
[img]layout/freccia_menu.gif[/img]</td>
</tr>
<tr>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
Collabora</td>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
[img]layout/freccia_menu.gif[/img]</td>
</tr>
<tr>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
Links</td>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
[img]layout/freccia_menu.gif[/img]</td>
</tr>
Come posso definire una funzione f(), in maniera tale da poter sostituire quanto sopra con:
codice:
f(Homepage)
f(Archivio News)
f(Collabora)
f(Links)
ovvero che sia tale per cui:
=
codice:
<tr>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
testo</td>
<td class="Menu_1" background="layout/bg_menu_scritte.gif" height="21">
[img]layout/freccia_menu.gif[/img]</td>
</tr>