PHP - For Loop

Adonn

New Member
Mar 25, 2011
27
4
This question is for you PHP coders out there ...
I currently have this in my script:

PHP:
for($flat=1;$flat==getFlatCount();$flat++)
{
	$rooms = $rooms . $flat ."/". getRoomName($flat) ."/" . getRoomOwner($flat) ."/". getRoomDoor($flat) ."/ekakerros/floor1/". $serverIP ."/". $serverIP ."/". $serverPort ."/0/null/". getRoomDescription($flat) . chr(13);
}
sendData($i,"BUSY_FLAT_RESULTS ". chr(13) . $rooms);

I am trying to send all the room's and their information to the client, and display it in the navigator.
However, it only returns 1 room (theres 3 in the database).

Any help would be greatly appreciated

Thanks,
Adonn
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
PHP:
for($flat=1;$flat<=getFlatCount();$flat++) 
{ 
    $rooms .= $flat ."/". getRoomName($flat) ."/" . getRoomOwner($flat) ."/". getRoomDoor($flat) ."/ekakerros/floor1/". $serverIP ."/". $serverIP ."/". $serverPort ."/0/null/". getRoomDescription($flat) . chr(13); 
} 
sendData($i,"BUSY_FLAT_RESULTS ". chr(13) . $rooms);

Try that. This looks like a Habbo thing, so I'm not really sure.
 

Users who are viewing this thread

Top