Re: [PHP] String Array Creation and assigment

2003-11-03 Thread Dan
i found the problem myself, array has to be defined like this:

$b=array[0=>0];

then $b can be any array of any type of index and values as you wish to
"assign" to it.

"Dan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> please help with the following:
>
> I tried this first :
> $b[] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how
to
> turn your experience into a fortune.  Toronto:  Key Porter books.';
> $b[] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
> Marketing.  New York:  Harper Business';
> ...
>
> then tried this :
> $b[0] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how
to
> turn your experience into a fortune.  Toronto:  Key Porter books.';
> $b[1] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
> Marketing.  New York:  Harper Business';
> ...
>
> none of the above work, what's right?
>
> help will be appreciated.
>
> Dan

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



Re: [PHP] String Array Creation and assigment

2003-10-30 Thread Eugene Lee
On Wed, Oct 29, 2003 at 12:47:58PM -0500, Dan wrote:
: 
: please help with the following:
: 
: I tried this first :
: $b[] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
: turn your experience into a fortune.  Toronto:  Key Porter books.';
: $b[] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
: Marketing.  New York:  Harper Business';
: ...
: 
: then tried this :
: $b[0] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
: turn your experience into a fortune.  Toronto:  Key Porter books.';
: $b[1] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
: Marketing.  New York:  Harper Business';
: ...
: 
: none of the above work, what's right?

Both of these examples worked for me without any problems.  What exactly
do you mean, "none of the above work"?  What happens when you do a simple
print_r($b) ?  Or even a basic is_array($b) after each set of variable
assignments?

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



Re: [PHP] String Array Creation and assigment

2003-10-29 Thread Dan
please help with the following:

I tried this first :
$b[] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
turn your experience into a fortune.  Toronto:  Key Porter books.';
$b[] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
Marketing.  New York:  Harper Business';
...

then tried this :
$b[0] = 'Book Worzel, Richard (1989). From Employee to Entrepreneur:  how to
turn your experience into a fortune.  Toronto:  Key Porter books.';
$b[1] = 'Book Ries, Al and Jack Trout (1994). The 22 Immutable Laws of
Marketing.  New York:  Harper Business';
...

none of the above work, what's right?

help will be appreciated.

Dan

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