Support Forums

Full Version: How can I echo a variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been learning how to make a table, but how can i echo a variable over and over? Thanks guys
Well, your account is closed, but I'll be of assistance, anyway.

PHP Code:
while(1) {
    echo 
$var;

(07-27-2010, 02:02 AM)Orgy Wrote: [ -> ]Well, your account is closed, but I'll be of assistance, anyway.

PHP Code:
while(1) {
    echo 
$var;


Does not quite answer his question though.
He wanted to repeat an echo from a table.
It does not matter. He is banned so i expect this thread to be closed.
(07-27-2010, 02:10 AM)DAMINK™ Wrote: [ -> ]Does not quite answer his question though.
He wanted to repeat an echo from a table.
It does not matter. He is banned so i expect this thread to be closed.

He asked how to echo a variable over and over.

And so what if he is banned? What if someone else comes along with the same question?
You would need to connect to the database in question before you could pull said variable from the table though yes?
Ultimately i wonder why someone would want to do this. I can only think for harm not good? Might be wrong though.
PHP and sql are not my strongest points.
Well, he's never said anything about a MySQL table. He could just mean a regular table ;)

But no, its used in common practice, to echo rows of a MySQL table into columns. Take for example the forum we're currently using. Its using a while loop to get the rows of the posts and echo them out into a table appropriately, one at a time, and in the correct order.

Same with threads, etc.
But it in a continuous loop.

Code:
while (true)
{
echo ($VARIABLE);
}
(07-30-2010, 10:40 AM)PurpleHaze Wrote: [ -> ]But it in a continuous loop.

Code:
while (true)
{
echo ($VARIABLE);
}

This is the exact same thing I already posted.
Seems he is unbanned and problem solved. Thread probably should be closed. Unless he comes back and posts.
(12-06-2010, 01:22 AM).Shannon Wrote: [ -> ]Seems he is unbanned and problem solved. Thread probably should be closed. Unless he comes back and posts.

Why close the thread?