Help with the code--new bie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m_kk
Forum Newbie
Posts: 8
Joined: Tue Feb 12, 2008 10:26 am

Help with the code--new bie

Post by m_kk »

Hello,

I need to read and understand some php code and I am new to this. I have the following code. I just need to know what is echo <<<ADDFORM is . I guess its a variable. But I could not find is anywhere in the page

Code: Select all

echo <<<ADDFORM
<form method="post" action="keywsave.php?act=add&filter_keyword=$fk">
<tr>
  <td class="header" width=120>$kwstr</td>
  <td class="left_td2" colspan=3>
    <input type="text" class="input" name="keyword" size="24">
  
   <input class=button type=submit value="$addstr">
  </td>
</tr>
</form>
ADDFORM;
Thanks in advacne
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Help with the code--new bie

Post by Christopher »

The operator <<< means that everything between the matching labels (in you case ADDFORM) will be treated as a multi-line string. You can also now use quotes for multi-line strings in PHP, so this syntax is used less often.
(#10850)
Post Reply