HTML/PHP/AJAX/JS - Wy?wietlenie zmiennej
Majcon - 18-12-2013, 17:06 Temat postu: Wyświetlenie zmiennej Witam jak wyświetlić zmienną w php w miejscu w którym chce
plik nazwa_body.tpa
Kod: | <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead">bla bla</th>
</tr>
<tr>
<td class="row1">
<div id="blablabla"?</div>
</td>
</tr>
<tr>
<td class="catBottom" height="28"> </td>
</tr>
</table> |
plik nazwa.php
Kod: | <?php
define('IN_PHPBB', true);
define('ATTACH', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
$page_title = 'Inne';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'nazwa_body.tpl')
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
echo "dafasfasfasfsfsa";
?> |
i chodzi o to żeby echo "dafasfasfasfsfsa"; wyświetliło się między <div id="blablabla"? a </div>
Woytec - 18-12-2013, 19:08
Przed
Kod: | $template->pparse('body'); |
Kod: | $template->assign_vars(array(
'NAZWA' => "dafasfasfasfsfsa"
)); |
a w tpl
Kod: | <div id="blablabla">{NAZWA}</div> |
|
|
|