On Sunday 31 March 2002 13:07, Chris Payne wrote:
> Hi there everyone,
> I do this to explode my input line which consists of however many words:
> $words = explode(" ", $testb);
> Now i've done this and I presume that $words holds all the info as an Array
> (new to arrays, sorry if i'm wrong) however, how can I put each item of the
> array from $words into a different string? IE: if there are 3 items, how
> could I have it so that the first word is stored in $word1, the second
> words is stored in $word2 etc??? Please help, thank you all so much :-)
Not sure why you want to do that. The whole point of using arrays is to
simplify the handling of multiple 'related' variables.
In the above example you would simply refer to the first word as $words,
the second as $words etc.
If you really want to do $word1, $word2 ..., then read about:
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Give me chastity and continence, but not just now.
-- St. Augustine
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php