php - i have same column name of first_name in database and have different user_type how to separated show in the two different column of site

Solution:
you have to check each row in your foreach statement if its user_type 3 or 4:
Try this
<?php if($value['user_type']=3) { echo "<td>".$value['first_name'].</td>"; } else { echo "<td></td>"; }?> // for user_type 3
<?php if($value['user_type']=4) { echo "<td>".$value['first_name'].</td>"; } else { echo "<td></td>"; }?> // for user_type 4
The 'if' statement checks the user type and write the name of an empty<td></td>
.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: an exception occurred in the driver: could not find driver
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.