| | |
What is $form<<<POST
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Please explain me and when we
Thanks in Advance...
echo $form; then it shows. please explain this. PHP Syntax (Toggle Plain Text)
$form=<<<POST <form method="post" action=""> </form> POST;
Thanks in Advance...
Ayesha
•
•
Join Date: Sep 2009
Posts: 43
Reputation:
Solved Threads: 9
That's a short way of assigning a variable a value that spans multiple lines and includes special characters that would normally interfere with the PHP language.
It's called NOWDOC (see http://www.php.net/manual/en/languag....syntax.nowdoc)
Consider this example:
This assigns the sentence (including line breaks) to the variable $text.
The syntax is:
$variable = <<<LABEL
contents go here....
LABEL
So, in your example, the value stored in $post is:
<form method="post" action="">
</form>
It's called NOWDOC (see http://www.php.net/manual/en/languag....syntax.nowdoc)
Consider this example:
php Syntax (Toggle Plain Text)
$text = <<<SPECIAL_LABEL The quick brown fox jumps over the lazy dog. SPECIAL_LABEL
This assigns the sentence (including line breaks) to the variable $text.
The syntax is:
$variable = <<<LABEL
contents go here....
LABEL
So, in your example, the value stored in $post is:
<form method="post" action="">
</form>
![]() |
Similar Threads
- Form post problems (PHP)
- Take part of URL, put into form, post to database. (PHP)
- form post problem (HTML and CSS)
- HTML Form post to PHP? (PHP)
- How Do We Make A Form Without Post Or Get (PHP)
Other Threads in the PHP Forum
- Previous Thread: chained select boxes
- Next Thread: Joomla help!
| Thread Tools | Search this Thread |
advanced apache api array beginner binary broken cakephp check checkbox class cms code cookies cron curl database date datepart display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google head href htaccess html if...loop image include includingmysecondfileinthechain insert ip javascript job joomla jquery key library limit link login mail menu mlm multiple mysql oop password paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search server sessions smarty sms sorting source space sql startup stored syntax system table traffic tutorial unicode update upload url validator variable video web youtube zend





