Jump to content

[SOLVED] For statment


the_oliver

Recommended Posts

You are best of setting up an array. You do it like so:

$c[] = 'some value';
$c[] = 'some other value';
$c[] = 'what ever else']

That will create an array. remeber everytime you do $c[]= you create new item for the array.

When you've created the array you can run through the array using a foreach loop like so:
[code=php:0]foreach($c as $value)
{
    // call your function
    urFunc($value);
}[/code]


Or you can use [url=http://www.php.net/manual/en/function.array-map.php]array_map[/url] which does the same thing as the foreach loop above
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.