natasha_thomas Posted March 13, 2011 Share Posted March 13, 2011 Folks, I am trying to create a new Array Elements which is concatenation of two variables. foreach($prodarray as $key => $value) { $prodarray2[$key] = $q_words.' '.$value; } Above code is not creating Array $prodarray2. But if i remove $q_words and just keep $value, it creats the array. Why is it so? Can someone please help me with this, please? Cheers Natasha Thomas Quote Link to comment https://forums.phpfreaks.com/topic/230499-not-able-to-pass-concatenated-value-to-an-array%E2%80%A6/ Share on other sites More sharing options...
sasa Posted March 13, 2011 Share Posted March 13, 2011 what you got if you try to var_dump($prodarray2); Quote Link to comment https://forums.phpfreaks.com/topic/230499-not-able-to-pass-concatenated-value-to-an-array%E2%80%A6/#findComment-1186914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.