Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Zend Framework link.
cykcykacz
post
Post #1





Grupa: Zarejestrowani
Postów: 550
Pomógł: 9
Dołączył: 29.05.2009
Skąd: Ostrów Wielkopolski

Ostrzeżenie: (0%)
-----


Nie wiem jak dodać link do tego kodu?
CODE
<?php
echo "<table cellpadding='2'>";
foreach($this->citylist as $key => $value) {
echo "<tr>
<td class='obrazek' rowspan='3'><a href='<?php $this->url(array('controller'=>'sale', 'action'=>'list', 'id' => '".$value->id."'));'><img src='/sala/public/img/background/obrazek.jpg'></a></td>
<td class='table1'width='150'>Miasto:".$value->miasto."</td>
</tr>
<tr>
<td class='table1'>Miasto:".$value->miasto."</td>
</tr>
<tr>
<td class='table1'>Miasto:".$value->miasto."</td>
</tr>";
}
echo "</table>";
?>


Ten post edytował cykcykacz 15.01.2010, 13:19:53
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
plurr
post
Post #2





Grupa: Zarejestrowani
Postów: 175
Pomógł: 12
Dołączył: 28.06.2007
Skąd: Bytom

Ostrzeżenie: (0%)
-----


1 - Twój widok, który tutaj prezentujesz jest straszny, używaj skróconej formy php:
  1.  
  2. <table>
  3. <?php foreach($this->citylist as $k => $v): ?>
  4. <tr><td><?php echo $k ?></td></tr>
  5. <?php endforeach; ?>
  6. </table>
  7.  


2 - Dziwne że Ci nie działa ten helper, na moje oko jest poprawny.
Chociaż zawsze możesz zrobić po prostu:
  1. <a href="/sale/list/id/<?php echo $id ?>">LINK</a>


http://naneau.nl/2007/07/08/use-the-url-view-helper-please/


Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 17.10.2025 - 00:08