Coding question

SpaceshipSpaceship
Watch

greatwineopen

Established Member
Impact
0
is there a code or command that makes a list inside of a table or cell alphabetical? (from the first letter of a line?) (without having to do it manually, obviously)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
in PHP

You can implode strings or add strings to an array with $bla[] into an array then asort (array sort) them

There's a few ways ...

Prolly same with any scripting language both client and server side
 
0
•••
Here is how to do it with PHP:

PHP:
<table>
<?php

$items = array('row 1', 'row 2', 'row 3', 'etc...');
natsort($items);

foreach($items as $row){
     echo '<tr><td>'.$row.'</td></tr>';
}
?>
</table>
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back