Re: Basic Array Questions

From: erdinc sabur (esabur@hotmail.com)
Date: Sat Oct 30 1999 - 14:31:36 EST


Hello,

here is a part from original Hughes documentation. This part is taken from
the document explaining standart module.

split ( )
split ( str , token )
char * str
char * token
split() splits the contents of a variable into multiple substrings using the
value of token as the separator character. The result of splitting the
string is returned as an array. If more than one character is passed as the
token, all but the first character is ignored.

Example :

$line = "bambi:David Hughes:Hughes Technologies";
$info = split($line,":");
printf("Username = $info\n");
printf("Full name = $info\n");
printf("Organisation = $info\n");
______________________________________

$info is an array of strings according to above explanation.
______________________________________

John Pallozzi has written:

>From: John_Pallozzi@idg.com
>To: msql-list@lists.hughes.com.au
>Subject: Basic Array Questions
>Date: Wed, 27 Oct 1999 17:40:18 -0400
>
>Hello,
>
>Can anyone point me to some on-line doc or show me how to specify an array
>of strings ?
>
>would it be:
>
>$small_array[2] = {"tom", "and", "jerry"}
>
>or:
>
>$small_array[0] = "tom";
>$small_array[1] = "and";
>$small_array[2] = "jerry";
>
>
>Also to set an array index equal to a variable would you use syntax like:
>
> $array[0] = $stringval;
>
>
>Any help would be greatly appreciated,
>
>John P.
>
>-------------------------------------------------------------------------
>To unsubscribe, go to http://www.Hughes.com.au/extras/email/
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:03:52 EST