How to separate single string values?
This is the string in the database: Small:4,Medium:2,Large:5,X-Large:4
I want to echo the sizes and quantity separately. For example I have 2 column table Sizes and Quantity.
<table>
<thead>
<th>Sizes</th>
<th>Quantity</th>
</thead>
<tbody>
<tr>
<td><?=“echo sizes here";?></td>
<td><?=“echo quantity here";?></td>
<tr>
</tbody>
So how can I echo sizes and quantity separately from a single string in the database??
explodeandsubstr. Use them.