Re: [PHP] assign associative array values to variables? SOLVED

2009-03-20 Thread PJ
Ford, Mike wrote: > On 18 March 2009 13:21, PJ advised: > > >> Thank you, once again, dg. Could not get it to work... whatever... >> But I did find an unexpected solution which made things very simple. >> This is the part for the categories section: >> >> if ( isset( $book_categories[$bookID] )

RE: [PHP] assign associative array values to variables? SOLVED

2009-03-20 Thread Ford, Mike
On 18 March 2009 13:21, PJ advised: > Thank you, once again, dg. Could not get it to work... whatever... > But I did find an unexpected solution which made things very simple. > This is the part for the categories section: > > if ( isset( $book_categories[$bookID] ) ) { > foreach ( $book_cate

Re: [PHP] assign associative array values to variables?

2009-03-18 Thread Thodoris
I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points the way how to extract values from

Re: [PHP] assign associative array values to variables? SOLVED

2009-03-18 Thread PJ
dg wrote: > > On Mar 17, 2009, at 6:47 PM, PJ wrote: > >> The problem is that the $array returns another array (multidimensional >> and associative ?? ) > > > $array_branch_one = array("value_one" => "red", "value_two" => "blue"); > $array_branch_two = array("value_three" => "green", "value_four"

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread Chris
PJ wrote: Chris wrote: PJ wrote: I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread PJ
dg wrote: > If I'm understanding your question correctly, this may help: > > > $array = array("value_one" => "red", "value_two" => "blue"); > extract($array); > print "$value_one, $value_two"; > Thanks for the suggestion. I've seen that example and have tried it as well as about a dozen others. Th

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread PJ
Chris wrote: > PJ wrote: >> I have been tearing out my hair to figure out a way to place array >> values into $variables with not much luck. I can echo the array to the >> screen but I can not manipulate the results. >> I have searched wide and far all day on the web and I find nothing that >> poin

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread Chris
PJ wrote: I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points the way how to extract va