Jump to content

Not able to pass Concatenated value to an Array…


natasha_thomas

Recommended Posts

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.