How would I make a table that takes a PHP array. The array is decided by a html input. The table has the actual values in the first column, length in the second column, and if it starts with 3 letters, 3 numbers or neither in the third column.
echo '<table>';
foreach ($array as $key => $value) {
echo '<tr><td>';
echo htmlspecialchars($array);
echo '</td><td>';
echo strlen($array);
echo '</td><td>';
//to work on
$trim = substr($array, 0, 3);
if(is_numeric($trim)){
echo 'numeric';
}elseif(is_string($trim)){
echo 'string';
}else{
echo 'else ?';
}
echo '</td></tr>';
}
echo '</table>';