echo html tags

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
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

echo html tags

Post by Ree »

is it generally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.
x4t
Forum Newbie
Posts: 8
Joined: Wed Jul 06, 2005 9:53 am
Location: Netherlands
Contact:

Re: echo html tags

Post by x4t »

Ree wrote:is it generally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.
I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.ea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?&gt;
  &amuse them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '&lt;span class=\&quote;class\&quote;&gt;....&lt;/span&gt;';
If I'm echo-ing a full table (eg. a to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&atr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

"Ree"]is it generally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '&lt;span class=\&quote;class\&quote;&gt;....&lt;/span&gt;';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?&gt;
  &lt;table&gt;
    ...
  &lt;/table&gt;
&lt;?php

// rest - mysql_close etc

?&gt;
[/php"Ree"]is it generally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.1]

So I think it depends on the context used. use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
&lto '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class=\&aho html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?&gt;
  &lt;table&gt;
    ...
  &lt;/table&gt;
&lt;?php

// rest - mysql_close etc

ds on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.enerally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.lt;?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depencho. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.<?php

// rest - mysql_close etc

?>


So I think it depends on the context used. a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?&gt;
  &ampyour opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used."Ree"]is it generally a good idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_clo]
echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?&gt;
  &lt;table&gt;
    ...
  &lt;/table&gt;
&lt;?php

// rest - mysql_close etc

?&gt;
[/php tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.d idea to echo html tags or is it better to use them normally (echo '<tr>' compared to <tr>)? i'm working with dynamic tables, and echo makes things a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&amped to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

&lt;?php 

// query etc

?>
  <table>
    ...
  </table>
&amhings a bit more nice (no need to break php into <?php ?> parts). your opinions/suggestions are welcome.[/quote]

I think it depends on what you want to echo. If I'm echo-ing a few lines, I use

Code: Select all

echo '<span class="class">....</span&gt;';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_clos
echo '<span class="class">....</span>';
If I'm echo-ing a full table (eg. a forum post), I use

Code: Select all

<?php 

// query etc

?>
  <table>
    ...
  </table>
<?php

// rest - mysql_close etc

?>
So I think it depends on the context used.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I really hate scripts that break from PHP to HTML and back more than once or twice. It looks ugly.
Post Reply