GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Help PHP QUESTION! (https://gfy.com/showthread.php?t=49424)

Direktor 01-29-2002 12:48 AM

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


:321GFY

Jade 01-29-2002 01:08 AM

/* 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++);

Lane 01-29-2002 01:08 AM

for ($i=1;$i<401;$i++) {eval("echo \$x$i;");}

Direktor 01-29-2002 01:25 AM

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?

:helpme

Direktor 01-29-2002 01:45 AM

nevermind, it works :thumbsup

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

after each $x


:)

Lane 01-29-2002 01:52 AM

can you give and example input/output ?

Theo 01-29-2002 03:48 AM

sure

Input:Equinox
Output:Gay

is this valid output? :evil-laug

awechen 01-29-2002 05:49 AM

PHP Code:

<?
$couner = "123";
for ($i=0;$i<$counter;$i++)
{
print "now $i  left ".($i-$couner)."\n";
}


Direktor 01-29-2002 09:19 AM

well output?


ok, hello, hi, fuck you!, welcome back, number of posts, etc.


All times are GMT -7. The time now is 08:06 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123