Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
Posted: Fri Jul 04, 2008 3:40 pm Post subject:
Typhoon808 wrote:
A for loop should easily handle this task.
Code:
<?php
for ( $count = 0; $count <=30; $count++ ){
echo "<div id=\"frt\">";
echo "name.$count";
}
?>
My PHP is a little rusty, but I'm sure that would add 30 names. Someone feel free to correct me if I'm wrong.
You forgot to close the <div> cases. Also when viewing the source it will have everything on one line as you didn't have line separations which does get annoying when trying to find issues in the code.
I don't have a site currently to test on so I can't guarantee this works:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum