Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[php]Listing.. like.. thing.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Thu Jul 03, 2008 4:29 pm    Post subject: [php]Listing.. like.. thing. Reply with quote

i wanna do a thing where each name has a box around it <div id="frt">
</div>

like this
OUTPUT:

<div id="frt">
name1
</div>
<div id="frt">
name2
</div>
and so on..

_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Thu Jul 03, 2008 5:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Jul 04, 2008 3:40 pm    Post subject: Reply with quote

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:
Code:
<?php

for( $x = 0; $x < 30; $x++ )
{
   echo "<div id=\"frt\">\n";
   echo "name variable or what ever..\n";
   echo "</div>\n";
}

?>

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites