fert Posted June 30, 2006 Share Posted June 30, 2006 I'm working on forum code for my website, but the php code i put in the table dosen't work any idea why? Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/ Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 POST YOUR CODE OK!As a guess i bet you havent used the correct while loop array/assoc statement lets see ha. Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51074 Share on other sites More sharing options...
fert Posted June 30, 2006 Author Share Posted June 30, 2006 [code]<table border="1" width="100%"> <tr> <td><?php //code to see if the topic is open or closed $file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_replies.txt","r"); $num=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_status.txt")); @fclose($file); if($num=="0") { echo "<img border=0 scr=www.usnet1.net/open.jpg alt=\"This thread is closed\">"; } else { echo "<img border=0 scr=www.usnet1.net/lock.jpg alt=\"This thread is open\">"; } ?> </td> <td width="511">What to post here<p><font size="1">Pyrokinetic_1</font></td> <td width="92"><?php //the number of replies $address="_private/website_Pyrokinetic_1_what_to_post_here_replies.txt"; $file=@fopen($address,"r"); $num=@fread($file,filesize($address)); @fclose($file); echo "$num"; ?> </td> <td width="94"><?php //number of views $file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_views.txt","r"); $num=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_views.txt")); @fclose($file); echo "$num"; ?> </td> <td width="106"><?php //the date it was posted $file=@fopen("_private/website_Pyrokinetic_1_what_to_post_here_date.txt","r"); $time=@fread($file,filesize("_private/Pyrokinetic_1_what_to_post_here_date.txt")); @fclose($file); echo "$time"; ?> </td> </tr></table>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51076 Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 Try the echo the below way.echo $somethink;notecho "$varable"; Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51084 Share on other sites More sharing options...
fert Posted June 30, 2006 Author Share Posted June 30, 2006 Thanks now it works now :) Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51087 Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 all the best mate. Quote Link to comment https://forums.phpfreaks.com/topic/13267-php-in-tables/#findComment-51089 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.