+ 1
how can I give blanks between a word and an input?
I have given several spaces between name and input and these blanks are not executed, name and input are still attached. <?php $i = 1; while ($i < 7) { echo "name <input type=text><br>"; $i++; } ?>
3 ответов
+ 7
there are several solutions, here are some of them
1)
<?php
$i = 1;
while ($i < 7) {
echo "name      <input type=text><br>";
$i++;
}
?>
you can use html entities to add non-breaking spaces
2)
<?php
$i = 1;
while ($i < 7) {
echo " <pre> name <input type=text><br> </pre>";
$i++;
}
?>
you can put you code in a <pre> tag (pre formated), that will respect the spaces
+ 1
What about " " ?
<?php
$i = 1;
while ($i < 7) {
echo "name <input type=text><br>";
$i++;
}
?>
0
thank you all