Hey all,
I could use some help with solving problem. Any suggestions are
welcome and very appreciated.
I have two arrays, $feeds and $feedDays. If they both have the same
count, or $feeds has only one value than there is not a problem.
In this situation
$feeds = array([0]=>'feed1', [1]=>'feed2');
$feedDays = array([0]=>'Monday', [1]=>'Tuesday',[2]=>'Wednesday',
[3]=>'Thursday',[4]=>'Friday');
I would like to create a third array:
$feedDays_feeds = array([0]=>0,[1]=>1,[2]=>0,[3]=>1,[4]=>0)
I am looking for a solution that can be used with any number of feeds,
but am having problems coming up with the needed logic. I went
through php.net and read all the array() functions but couldn't really
point out a solution. I am going to try and use array_pad(), but I
figured it best if I tried to get some guidance here.
Thanks for any suggestions.
I could use some help with solving problem. Any suggestions are
welcome and very appreciated.
I have two arrays, $feeds and $feedDays. If they both have the same
count, or $feeds has only one value than there is not a problem.
In this situation
$feeds = array([0]=>'feed1', [1]=>'feed2');
$feedDays = array([0]=>'Monday', [1]=>'Tuesday',[2]=>'Wednesday',
[3]=>'Thursday',[4]=>'Friday');
I would like to create a third array:
$feedDays_feeds = array([0]=>0,[1]=>1,[2]=>0,[3]=>1,[4]=>0)
I am looking for a solution that can be used with any number of feeds,
but am having problems coming up with the needed logic. I went
through php.net and read all the array() functions but couldn't really
point out a solution. I am going to try and use array_pad(), but I
figured it best if I tried to get some guidance here.
Thanks for any suggestions.
Comment