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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-29-2002, 12:48 AM   #1
Direktor
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


Direktor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 01:08 AM   #2
Jade
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++);
__________________

Cum see me at http://BlowjobJade.com
Jade is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 01:08 AM   #3
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
for ($i=1;$i<401;$i++) {eval("echo \$x$i;");}
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 01:25 AM   #4
Direktor
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?


Last edited by Direktor; 01-29-2002 at 01:27 AM..
Direktor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 01:45 AM   #5
Direktor
Registered User
 
Join Date: Dec 2001
Posts: 529
nevermind, it works

now just need to figure out how to add " " and ", "

after each $x


Direktor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 01:52 AM   #6
Lane
Will code for food...
 
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
can you give and example input/output ?
__________________
Lane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 03:48 AM   #7
Theo
HAL 9000
 
Industry Role:
Join Date: May 2001
Posts: 34,515
sure

Input:Equinox
Output:Gay

is this valid output?
Theo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 05:49 AM   #8
awechen
Confirmed User
 
Join Date: Oct 2001
Location: LA
Posts: 162
PHP Code:
<?
$couner = "123";
for ($i=0;$i<$counter;$i++)
{
print "now $i  left ".($i-$couner)."\n";
}
__________________
ah you have been blessed with 72 virgins?
awechen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-29-2002, 09:19 AM   #9
Direktor
Registered User
 
Join Date: Dec 2001
Posts: 529
well output?


ok, hello, hi, fuck you!, welcome back, number of posts, etc.
Direktor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.