/    Sign up×
Community /Pin to ProfileBookmark

the table is coming from php
this isnt the actual code but just an example

what i want to do is after the while loop executed 9 times i want it to go to the next line or do a <br>

echo “<table>”;
$num=1;
echo “<tr><td>”;
while($num<100){ echo ‘<img src=”image.jpg” height=”75px” width=”75px”>’;
$i++
}
echo “</table>”; ?>

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogDec 03.2009 — It would be something like this, replacing the line where you just do [b]$i++[/b]:
<i>
</i>if($i++ % 9 == 0)
{
echo "&lt;br /&gt;n";
}
Copy linkTweet thisAlerts:
@robertbarzykauthorDec 03.2009 — what does the &#37; mean ?

and is there any way i can make it </br> at any multiple of 9 ?
Copy linkTweet thisAlerts:
@robertbarzykauthorDec 03.2009 — nvm i see =) thanks !
Copy linkTweet thisAlerts:
@robertbarzykauthorDec 09.2009 — i know the code works you gave me.

but on one certain page it echos the <br/> after one line and i have it set to 4

any idea why? heres the url

http://www.amillionadds.com/train/third.php
×

Success!

Help @robertbarzyk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...