-1
I’m studying PHP for a booklet I found on the net and she asked to enter a code but after I type not the error and nor does it show what was the result that should write the contents of the array on the screen.
"Undefined variable: producs in C..."
I went to the top of the code and typed
if(isset($_POST['products'])){
and I put the key lock down but it didn’t help, it doesn’t show any error and neither the result.
$products = array(array('TIR', 'tires', 100),
array('OIL', 'oil', 10),
array('SPK', 'spark plugs', 4));
echo '|'.$products[0][0].'|'.$products[0][1].'|'.$producs[0][2].'|<br>';
echo '|'.$products[1][0].'|'.$products[1][1].'|'.$producs[1][2].'|<br>';
echo '|'.$products[2][0].'|'.$products[2][1].'|'.$producs[2][2].'|<br>';
I fixed it, yet the error persists.
– user8470
The same error ? How did the code look now ?
– Diego Souza