I have while loop and in that there's forum posts.I want to show number of posts (1,2..).
Let me show you what i think
while($some = mysql_fetch_array($forum_posts)){
echo 'Number of post is $num++';
}
and show like
------ Thread -------
------ Posts -------
Text of post 1.
Text of post 2.
Text of post 3.
Thanks.Sorry for bad english
$num must be initialized!
$num = 1;
while($some = mysql_fetch_array($forum_posts)){
echo 'Number of post is '.($num++);
}
$num = 0;
while($some = mysql_fetch_array($forum_posts)){
echo 'Number of post is '.++$num;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With