![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Registered User
Join Date: Dec 2001
Posts: 529
|
Help PHP QUESTION!
My code:
<?php $xi = "x"; for ($i = 1; $i < 400; ++$i) { echo ("$xi.$i"); ?> I know its wrong.. but how do I go about if I want to: echo $x1 to $x400 ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jun 2001
Location: Houston, Texas
Posts: 329
|
/* example 1 */
for ($i = 1; $i <= 10; $i++) { print $i; } /* example 2 */ for ($i = 1;;$i++) { if ($i > 10) { break; } print $i; } /* example 3 */ $i = 1; for (;;) { if ($i > 10) { break; } print $i; $i++; } /* example 4 */ for ($i = 1; $i <= 10; print $i, $i++); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Will code for food...
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
|
for ($i=1;$i<401;$i++) {eval("echo \$x$i;");}
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Join Date: Dec 2001
Posts: 529
|
very close, but is not printing out anything if I do this for example...
www.mydomain.com/thescript.php?x330=hello or www.mydomain.com/thescript.php?x330=hello&x331=bye&x400=cya see where im heading? ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Registered User
Join Date: Dec 2001
Posts: 529
|
nevermind, it works
![]() now just need to figure out how to add " " and ", " after each $x ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Will code for food...
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
|
can you give and example input/output ?
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
HAL 9000
Industry Role:
Join Date: May 2001
Posts: 34,515
|
sure
Input:Equinox Output:Gay is this valid output? ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Oct 2001
Location: LA
Posts: 162
|
PHP Code:
__________________
ah you have been blessed with 72 virgins? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Registered User
Join Date: Dec 2001
Posts: 529
|
well output?
ok, hello, hi, fuck you!, welcome back, number of posts, etc. |
![]() |
![]() ![]() ![]() ![]() ![]() |