Re: [PHP] assign array values to variables

2009-03-09 Thread haliphax
On Mon, Mar 9, 2009 at 9:25 AM, Jim Lucas wrote: > haliphax wrote: >> >> On Mon, Mar 9, 2009 at 2:22 AM, Jim Lucas wrote: >>> >>> PJ wrote: >> >> PJ, this looks like your third thread for this same question. It might >> be easier to get a straight answer if your request isn't scattered all >> ove

Re: [PHP] assign array values to variables

2009-03-09 Thread Jim Lucas
PJ wrote: Jochem Maas wrote: PJ schreef: Seems it should be simple, but how does one extract values from an array and assign them to a variable? foreach ($categoriesIN as $category) { 1. if $categoriesIN comes from a POST, use $_POST['categoriesIN'] instead. It does, but results are the same.

Re: [PHP] assign array values to variables

2009-03-07 Thread Nathan Nobbe
On Sat, Mar 7, 2009 at 3:20 PM, PJ wrote: > Jochem Maas wrote: > > PJ schreef: > >> Seems it should be simple, but how does one extract values from an array > >> and assign them to a variable? > >> foreach ($categoriesIN as $category) { > > > > 1. if $categoriesIN comes from a POST, use $_POST['c

Re: [PHP] assign array values to variables

2009-03-07 Thread PJ
Jochem Maas wrote: > PJ schreef: >> Seems it should be simple, but how does one extract values from an array >> and assign them to a variable? >> foreach ($categoriesIN as $category) { > > 1. if $categoriesIN comes from a POST, use $_POST['categoriesIN'] instead. It does, but results are the same.

Re: [PHP] assign array values to variables

2009-03-07 Thread Jochem Maas
PJ schreef: > Seems it should be simple, but how does one extract values from an array > and assign them to a variable? > foreach ($categoriesIN as $category) { 1. if $categoriesIN comes from a POST, use $_POST['categoriesIN'] instead. better yet use the filter extension (part of the core) to retr

[PHP] assign array values to variables

2009-03-07 Thread PJ
Seems it should be simple, but how does one extract values from an array and assign them to a variable? foreach ($categoriesIN as $category) { echo "$category"; } or if(!empty($_POST['categoriesIN'])){ foreach( $_POST['categoriesIN'] as $key => $value) { echo "value = $value"; }