-3
$lista = $_POST['lista'];
echo substr("$lista", 0, 28);
?>
<form action="" method="POST">
<textarea cols=60 rows="10" name="lista" maxlength="500" wrap="hard" placeholder="coragem, você consegue ! "></textarea>
<input type="submit" name="Envia" value="Enviar">
<input type="reset" name="Apaga" value="Apagar">
This is the second time I try to create and are closing for lack of details, please help a direction, because I honestly do not know what I can change to make it clearer...
I know it’s raw, but that’s basically it, I’m going to put a list of numbers separated by line and I need each line to have a character limitation.
My problem is: When I glue my list to it, only the first line is worked in PHP.
The number of lines will vary, I need each line in the list to be formatted equally, which has the same character numbers.
Example:
By inserting the following list of numbers in textarea, I need you to return each line running the command substr("$lista", 0, 5)
that is, each line is limited to only 5 characters.
11111111111111111111111111111
22222222222222222222222222222
33333333333333333333333333332
44444444444444444444444444444
In case it would return:
11111
22222
33333
44444
Currently, when entering my list of numbers, only the first line is executed, ie, returns only:
11111
Ignoring all other lines...
That’s exactly what it is!! Thank you very much, I didn’t understand the negatives, but anyway, I don’t know how to thank you for that, took a great weight off my back haha!! Thank you very much Junior.
– João Victor Gomes Moreira