| @@ 346-352 (lines=7) @@ | ||
| 343 | ||
| 344 | // Begin, th first |
|
| 345 | $s_table = $s_line; |
|
| 346 | foreach ($ar_thead as $col) { |
|
| 347 | // Make them length = width |
|
| 348 | $s = mb_strimwidth(ArrayRead($col, 'title', '') |
|
| 349 | . str_repeat(' ', $col['width']) |
|
| 350 | , 0, $col['width'], '', 'utf-8'); |
|
| 351 | $s_table .= $s . $s_split; |
|
| 352 | } |
|
| 353 | $s_table .= "\n" . $s_line; |
|
| 354 | ||
| 355 | // Then, td |
|
| @@ 357-363 (lines=7) @@ | ||
| 354 | ||
| 355 | // Then, td |
|
| 356 | foreach ($ar_data as $row) { |
|
| 357 | foreach ($ar_thead as $col) { |
|
| 358 | // Trim/fill length |
|
| 359 | $s = mb_strimwidth(ArrayRead($row, $col['idx'], '') |
|
| 360 | . str_repeat(' ', $col['width']) |
|
| 361 | , 0, $col['width'], '', 'utf-8'); |
|
| 362 | $s_table .= $s . $s_split; |
|
| 363 | } |
|
| 364 | $s_table .= "\n"; |
|
| 365 | } |
|
| 366 | ||