How to output a string multiple times?
I am using this code to generate rows, depending on the value in the database, and I'm sure there is a more efficient way of doing this, but I'm unsure how!
if ($empty == 1) {
echo "Empty ";
}
if ($empty == 2) {
echo "Empty ";
echo "Empty ";
}
if ($empty == 3) {
echo "Empty ";
echo "Empty ";
echo "Empty ";
}
if ($empty == 4) {
echo "Empty ";
echo "Empty ";
echo "Empty ";
echo "Empty ";
}