moin!
ich hab hier gerade so ein obskures problem mit einer smarty zuweisung:
so weit so gut. wenn ich in die while schleife mal ein echo einfuege, zb echo $profile['joined'];, wird das auch schoen ausgegeben.PHP-Code:$sql = "SELECT id,name,location,age,avatar,joined,url FROM users WHERE id = $userid";
$result = mysql_query($sql) OR die(mysql_error());
//gibt es das profil ueberhaupt?
if (mysql_num_rows($result) == '1') {
while($profile = mysql_fetch_assoc($result)) {
$profile['joined'] = date("d.m.Y", $profile['joined']);
$profilevalues[] = $profile;
}
// profil an smarty
$smarty->assign('profile', $profilevalues);
im zugewiesenen template
$smarty->display('profile.tpl');
setze ich nun ein, zb:
{$profile[profile].joined}
doch es wird nichts ausgegeben. danke fuer jeden tipp!

LinkBack URL
About LinkBacks


Zitieren
Lesezeichen