Jump to content

Recommended Posts

hi there.

 

ive got the following code

 

 <?php
			  print"<td align>$getthreads3[showtime] </td>"
			  ?>

 

i need to align that column to the right. but because its using print it doesnt allow me to just add ="right" into it.

 

is there a way to do this.

 

and also, iv been told using print and echo arnt good programming practice, so how would i go about adding that line without using either?

Link to comment
https://forums.phpfreaks.com/topic/132222-aligning-tables-using-php/
Share on other sites

still not working :/

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\WAMP\www\NEW\News\news_board.php on line 281

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\WAMP\www\NEW\News\news_board.php on line 281

No it doesn't, although the browser may vary on this. I believe that there may be a problem before this that is aligning the table data. Try

<?php
echo "<td align='right' style='text-align:right;'>".$getthreads3['showtime']."</td>";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.