sprintf & Argumentenproblem

Kerim

Gesperrt
Hab 2 Zeilen Code, wo ich immer wieder die Fehlermeldung erhalte:

Warning: sprintf() [function.sprintf]: Too few arguments in /www/htdocs/v082486/catalog/checkout_process.php on line 213


PHP:
$products_ordered .= sprintf('%4d x %-30s = %20s %20s',$order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes) . "\n";


UND:

PHP:
$email_order .= sprintf('%-30s%30s', strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text'])) . "\n";


Offenbar hab ich in den sprinft zuwenig Argumente angegeben, kann mir jemand da helfen :rolleyes:
 
Mein Problem ist im moment eher, die Argumente zu erkennen, die mit einem Punkt-Operator verbunden sind

Ich versuch´s mal:

Linke Seite:
$order->products[$i]['qty']
$order->products[$i]['name']
$order->products[$i]['model']

Rechte Seite:
$currencies->display_price($order->products[$i]['final_price']
$order->products[$i]['tax']
$order->products[$i]['qty'])
$products_ordered_attributes

Lieg ich damit richtig?
 
Zurück