3v4l.org

run code in 300+ PHP versions simultaneously
<?php $upsells = ['Наименование товара №1_~-250$_~-99$', 'Наименование товара №2_~-699$_~-399$', 'Наименование товара №3_~-299$_~-149$',]; $orderDetails = ['Наименование', 'Старая цена', 'Новая цена']; $text = ''; foreach ($upsells as $upsell) { $productInformation = explode('_~-', $upsell); for ($i = 0; $i < count($productInformation); $i++) { $text .= '<b>'.$orderDetails[$i].':</b> '.$productInformation[$i].'<br />'; } } echo $text;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.68 ms | 2209 KiB | 11 Q