Can someone tell me how I can make an array increase its index? (ie a
script that pushes values into an array)

I figured if in the link:

<a href="'.$PHP_SELF.'?add_form='.$value.'">

instead of $value (or if value was an array) I could do something like:

for ($i=0; $i<count($myarray); i++) {

}

or something like:

foreach($array as $num) {

}

I really wish I knew how to make something like:

If isset blah blah increase the values in this array and then echo this
variable as many times as array has values;

- Vic


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 13, 2002 3:23 PM
To: 'Rasmus Lerdorf'; 'vic'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] count link clicks

I think I'm on the right track with:

<?php

$i = $value++;

// Show first link
echo '<a href="'.$PHP_SELF.'?add_form='.$value.'">
        New paragraph
        </a>
        </font>';
        
// Isert form html into $data_fields variable
$data_fields = '<html html blah blah>
                <a href="'.$PHP_SELF.'?add_form='.$value.'">
                New paragraph
                </a>';

while ($i = $value) {
echo $data_fields;
}

?>

The only problem is that it runs for an infinite number of times, I want
it to run for as many times as the http://domain.com?add_form=1 (IE: 1
in this case) defines.

- Vic

______________________________________________________________________ 
Post your ad for free now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

______________________________________________________________________ 
Post your ad for free now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to