[Solved] how assign mysql rows in smarty php?


From the manual:
http://www.smarty.net/crash_course

include('Smarty.class.php');

// create object
$smarty = new Smarty;

// assign some content. This would typically come from
// a database or other source, but we'll use static
// values for the purpose of this example.
$smarty->assign('name', 'george smith');
$smarty->assign('address', '45th & Harris');

// display it
$smarty->display('index.tpl');

You need to call $smarty->assign() for each variable you want to pass to the template.

——— EDIT ———–
$smarty->assign() takes 2 parameters:
1. The name you’d like to use to access the value in the template file (a string)
2. The actual value you want to access

6

solved how assign mysql rows in smarty php?