1

I am creating custom pages in phpbb and do not understand

<table class="table1" cellspacing="1">
<tr>
    <th>ID</th>
    <th>NAME</th>
    <th>{L_EMAIL}</th>
</tr>
<!-- BEGIN block_name -->
<tr class="<!-- IF block_name.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
    <td>{block_name.ID}</td>
    <td>{block_name.NAME}</td>
    <td>{block_name.EMAIL}</td>
</tr>
<!-- END block_name -->

I do not understand the following

    <th>ID</th>
    <th>NAME</th>
    <th>{L_EMAIL}</th>

Where is it getting its values, and how values are sent to such files.
Where can I find some examples?

2
  • that's not php. it's maybe a templating engine built on TOP of php, but that's not php. Commented Jun 20, 2014 at 15:05
  • whatever that is, I need a hello world! example with all minimum required files and file structure Commented Jun 20, 2014 at 16:06

1 Answer 1

2

First of all i would like to tell you that its the plain html, the {L_NAME} is getting replaced from you PHP script. It works something like this:-

Step1: my_html_file.html

First of the below written code is HTML. The purpose of writing {L_NAME} is to replace the {L_NAME} with the user's last name with any PHP variable's value.

<th>ID</th>
<th>NAME</th>
<th>{L_EMAIL}</th>

Step2: my_php_file.php

Now you can use the following code to replace the {L_NAME} like this:-

$name = 'Dinesh Singh Rawat';
$html_content = file_get_contents('my_html_file.html');
echoh $newStr = str_replace('{L_NAME}', $name, $html_content);

OUTPUT:

ID NAME DINESH SINGH RAWAT

Hope you are getting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.