Innanzitutto ciao a tutti.


Modificando una versione particolare di Virtuemart (ecommerce open source per joomla) trovo il seguente codice:

Codice PHP:
foreach ($product->customPrices as $customPrice) {
    foreach (
$customPrice as $customId => $custom_fieldId) {

        if ( 
is_array($custom_fieldId) ) {
            foreach (
$custom_fieldId as $userfieldId => $userfield) {
                
$productKey .= $customId ':' $userfieldId ';';
                
$product->userfield[$customId '-' $userfieldId] = $userfield;
            }
......................................... 
ora, facendo un print_r di product (e leggendo il codice stesso), io so che questa è la struttura di $product (almeno la parte che mi interessa):
$product contiene l'array customPrices che a sua volta contiene vari array numerati.

Il caso che mi interessa è il numero 7 (VEDI SOTTO). Vorrei trasformare quell'array in un unica stringa.
Ora, come faccio, una volta trasformato in stringa, a modificarlo dentro $product?
ho provato:
Codice PHP:
$product->customPrices[$customId][$userfieldId] = "lamiastringa"
ma non funziona

Questo è un esempio del print_r di customPrices
codice:
[customPrices] => Array ( [0] => Array ( [7] => 10496 ) [1] => Array ( [23] => 10534 ) [2] => Array ( [24] => 10532 ) [3] => Array ( [25] => 10533 ) [4] => Array ( [26] => 10521 ) [5] => Array ( [27] => 10525 ) [6] => Array ( [37] => 10514 ) [7] => Array ( [40] => Array ( [10531] => zzzzz aaaaa ) ) )

Grazie in anticipo dell'aiuto