Skip to content
Advertisement

my all value is not showing in view, what can i d [closed]

This is my edit page where i want to get data from database in input box

 @php
     $abs = explode(',' , $order->product);
     $quantitys = explode(',' , $order->quantity);
     foreach (array_combine( $quantitys, $abs) as $quantity => $ab) {
         $val = $ab . " " . $quantity;
         echo "<input type=text name=pro value=$val>";
         echo  $val;
         echo '<br>';
     }
 @endphp

This is pic you understand well after see image at bottom of input box this is original value that has to come

enter image description here

enter image description here

Advertisement

Answer

Rewrite this:

echo "<input type=text name=pro value=$val>";

to this

// add double quotes to attribute values
echo '<input type="text" name="pro" value="'.$val.'">'; 
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement