|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
awerskto Smarty n00b
Joined: 19 Oct 2007 Posts: 3
|
Posted: Fri Oct 19, 2007 12:52 pm Post subject: Smarty i problem z dobraniem sie do danych |
|
|
Code: | {$wynik} stdClass Object (6)
->link = stdClass Object (3)
->handle = Resource id #6
->module = 3
->database = "test_com"
->handle = Resource id #7
->flags = 79
->info = Array (2)
name => Array (6)
0 => "id"
1 => "machine"
2 => "group_name"
3 => "benchmark"
4 => "param_name"
5 => "value"
type => Array (6)
0 => "int8"
1 => "text"
2 => "text"
3 => "text"
4 => "text"
5 => "float8"
->cols = 6
->rows = 309 |
Tak wyglada debug z smartow i mam pytanie jak sie dobrac to danych dokladnie 309 rzedow
{$wynik.$id} nie dziala. Poczytalem juz http://smarty.php.net/manual/en/language.syntax.variables.php
ale nie widze mozliwosc rozwiazanie tego problemu. a w przegladarce
dostaje Code: | Fatal error: Cannot use object of type stdClass as array
in /.... |
|
|
Back to top |
|
sf Smarty n00b
Joined: 26 Nov 2007 Posts: 2
|
Posted: Mon Nov 26, 2007 8:54 am Post subject: |
|
|
Bo w wyniku masz przecież obiekt i error wyjaśnia, że nie możesz używać tego tak samo jak tablicy. Kombinuj coś w stylu:
{$wynik->name.id}
Chodź nie wiem czy odwołać się można tylko do tablicy czy też do konkretnego klucza w ten spos _________________ Most popular Open Source CMS. W przygotowaniu kurs php. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|