Buna seara
Cum pot apela o functie in echo?
De exemplu
function test()
{
echo 'test';
}
echo'
.....
test();
.....
';
Se poate apela ?
Sau trebuie sa rup echo?
Cum pot apela o functie in echo? [REZOLVAT]
Moderatori: Moderatori, Start Moderator
-
vlivius1
- Senior Member
- Mesaje: 399
- Membru din: Dum Aug 12, 2007 3:50 pm
- Localitate: Bucuresti
- Contact:
Cum pot apela o functie in echo? [REZOLVAT]
Ultima oară modificat Sâm Ian 10, 2009 11:23 pm de către vlivius1, modificat 1 dată în total.
-
vlivius1
- Senior Member
- Mesaje: 399
- Membru din: Dum Aug 12, 2007 3:50 pm
- Localitate: Bucuresti
- Contact:
Dupa ce am aflat care a fost gresela mea acum am urmatoarea problema , nu imi afiseaza in link-ul detalii, imi afiseaza in tabel.
function link_det ()
{
$cat = ( isset($_GET['cat'])) ? 'cat='.$_GET['cat'].'' : 'cat_s='.$_GET['cat_s'].'' ;
$row = ( isset($_GET['row'])) ? 'row='.$_GET['row'].'' : 'row_s='.$_GET['row_s'].'' ;
$s_cat = ( isset($_GET['s_cat'])) ? 's_cat='.$_GET['s_cat'].'' : 's_cat_s='.$_GET['s_cat_s'].'' ;
echo 'index.php?'.$cat.'&'.$row.'&'.$s_cat.'det=on';
}
......
echo'
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="150" height="100"><div align="center"><a href="'.$row_v_prod['poza'].'" rel="lightbox[]" title="'.$row_v_prod['produs'].'"><img src="'.$row_v_prod['poza'].'" width="100" alt="'.$row_v_prod['produs'].'" border="0" /></a></div></td>
<td height="100" class="title1"><div align="left">
<p>'.$row_v_prod['produs'].'</p>
<p class="text1"><em>'.$row_v_prod['descriere'].'</em></p>
</div></td>
</tr>
<tr>
<td width="150" height="20" class="text1"><div align="center"> <span class="title2">Pret - '.$row_v_prod['pret'].' lei </span></div></td>
<td height="20" class="text1"><div align="left"><a href="'.link_det().'">Detalii</a></div></td>
</tr>
<tr class="row_small">
<td height="20" colspan="2" class="text1" style="border-bottom:1px dashed #CCCCCC"> </td>
</tr>
</table>
';
}
......
function link_det ()
{
$cat = ( isset($_GET['cat'])) ? 'cat='.$_GET['cat'].'' : 'cat_s='.$_GET['cat_s'].'' ;
$row = ( isset($_GET['row'])) ? 'row='.$_GET['row'].'' : 'row_s='.$_GET['row_s'].'' ;
$s_cat = ( isset($_GET['s_cat'])) ? 's_cat='.$_GET['s_cat'].'' : 's_cat_s='.$_GET['s_cat_s'].'' ;
echo 'index.php?'.$cat.'&'.$row.'&'.$s_cat.'det=on';
}
......
echo'
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="150" height="100"><div align="center"><a href="'.$row_v_prod['poza'].'" rel="lightbox[]" title="'.$row_v_prod['produs'].'"><img src="'.$row_v_prod['poza'].'" width="100" alt="'.$row_v_prod['produs'].'" border="0" /></a></div></td>
<td height="100" class="title1"><div align="left">
<p>'.$row_v_prod['produs'].'</p>
<p class="text1"><em>'.$row_v_prod['descriere'].'</em></p>
</div></td>
</tr>
<tr>
<td width="150" height="20" class="text1"><div align="center"> <span class="title2">Pret - '.$row_v_prod['pret'].' lei </span></div></td>
<td height="20" class="text1"><div align="left"><a href="'.link_det().'">Detalii</a></div></td>
</tr>
<tr class="row_small">
<td height="20" colspan="2" class="text1" style="border-bottom:1px dashed #CCCCCC"> </td>
</tr>
</table>
';
}
......
- vectorialpx
- Senior Member
- Mesaje: 4832
- Membru din: Mar Mar 01, 2005 9:48 am
- Localitate: Bucuresti
- Contact:
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 59 vizitatori