I'm running into an issue where a dynamically created table in PHP, echo'd in the body of the HTML tag, is not displaying at all on my mobile device. The same information is displayed correctly on my PC.
If I take the output from PHP in text form and paste it into the HTML portion, then the table displays correctly, in both my mobile and desktop environments.
For example, the following will display correctly in both my mobile and desktop environments.
<table class="table table-striped table-sm text-nowrap">
<thead>
<tr>
<th scope="col">Class</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Default</th>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-primary">
<th scope="row">Primary</th>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-secondary">
<th scope="row">Secondary</th>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
As an example, the following will only display on my desktop correctly.
<?php
$_tble = ' <tr>
<th scope="row">Default</th>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-primary">
<th scope="row">Primary</th>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-secondary">
<th scope="row">Secondary</th>
<td>Cell</td>
<td>Cell</td>
</tr>';
?>
<table class="table table-striped table-sm text-nowrap">
<thead>
<tr>
<th scope="col">Class</th>
<th scope="col">Heading</th>
<th scope="col">Heading</th>
</tr>
</thead>
<tbody>
<?php echo $_tble; ?>
</tbody>
</table>
Does anyone have any suggestion or ideas as to why this might be happening??
Using - Bootstrap 4.3, php 7.2.33
question from:
https://stackoverflow.com/questions/65859280/dynamic-table-not-displaying-on-mobile-device-similar-static-data-does 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…