Echo Php Style

Unknown Reply 3:09 PM

Echo Multiple Lines At Once. 

echo <<<END

all sorts of text and statements...
END;

but if the following produces a parse error at line 14 which is the closing

php tag.

<?php

echo <<<TT
<tr>
<td>
<p>1. some text...</p>
</td>
<td>
<p>
<input type="radio" name="gs.$i" value="1">
</p>
</td>
</tr>
TT;
?>

 

Echo Data On Seperate Lines
I have been trying to display the result from the textarea on seperate lines for e.g

if i enter
a
b
c
in the text area it should display the same rather than what it is doing write now "a b c" Can someone please help me with this?

<?php
$action = $_REQUEST['action'];
if ($action == submit) {
print str_replace("
", "", $_POST['testt']);
}
echo "<form method=post action=?action=submit>";
echo "<textarea name=testt></textarea>";
echo "<input type=submit name=test value=test></form>"
?>

 Sql - Echo From Database With Break Lines?
This is a simple question I believe, but can't figure it out yet.I have a text area that after submit goes to a database, and then I echo this text on a page, but here is the problem, say the person writes on the textarea: Hi Robert,This is just a test!. Jason.And the message goes to the database just like that, but when I echo that, I get: Hi Robert, This is just a test!. Jason.This is the form:

<textarea name="newMessage" wrap="hard" cols="30" rows="3"></textarea>
<input type="submit" name="submit" value="Ingresar"> </>

This is the code I use to display the text:

<?php
while($row = mysql_fetch_assoc($messages)){
echo $row['mensaje']."<br/>";

[code]...

 

 

Related Posts

Web 2507990254253902717
Comments
0 Comments
Facebook Comments by Media Blogger

Post a Comment

Search

Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Popular Posts

Translate