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 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); 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
Archived
This topic is now archived and is closed to further replies.