Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

PHP Parse error: syntax error, unexpected variable

11 views
Skip to first unread message

Enrico Maria Chellini

unread,
Nov 21, 2023, 8:08:33 AM11/21/23
to

php 8.0.x

function FM_UF_weight($product) {
  $shipping_weight = $product['products_weight']  . ' kg';
  return $shipping_weight;
}


risultato

mod_fcgid: stderr: PHP Parse error: syntax error, unexpected
variable "$shipping_weight" in

che c'è di sbagliato?

Enrico

Mirko

unread,
Nov 21, 2023, 1:44:38 PM11/21/23
to
Il 21/11/23 14:08, Enrico Maria Chellini ha scritto:
se fai
$shipping_weight = ' kg';

funziona?
se si

$product['products_weight'] non ti sta ritornando un testo?

Enrico Maria Chellini

unread,
Nov 21, 2023, 2:25:21 PM11/21/23
to

>
> se fai
> $shipping_weight = ' kg';
>
> funziona?
> se si
>
> $product['products_weight'] non ti sta ritornando un testo?

mi hanno girato un file con lo stesso script che funziona;

probabilmente ho un problema di charset sugli apostrofi.

è l'unica cosa che mi viene in mente .

grazie lo stesso
Enrico

0 new messages