Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
PHP itself is a template engine that solves your problem:<?=$user->name?>
I would suggest using a ready made template engine like twig to render the template.
0. Create the AUser.php model:
<?php
class AUser extends CActiveRecord
{
public $id, $login, $hash, $email;
public $tel_1, $tel_2, $tel_3, $country_id;
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName(){
// Название таблицы с данными пользователей в БД
return 'user';
}
}
<body>
<div>
Привет, <?=$userData['name']?>!
</div>
</body>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question