3v4l.org

run code in 300+ PHP versions simultaneously
<?php $question = ['name' => 'How many steps has your stair', 'price' => 10.00]; // price per step = 10 $steps = 5; if($steps >= 5 ) { $question['price'] = 8.00; echo $steps * $question['price']; } else { echo $steps * $question['price']; } // Databse now: // product: has { category_id } // product_question { id | product_id | question_id | price } // Manage the conditional price in the DB.

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
168.78 ms | 2043 KiB | 10 Q