Jump to content

function print outside div


MuseiKaze

Recommended Posts

Hey guys. Ive been working on a setup page which will install a few things and I've been having some problems with this function I created. It seems to print out under the <body> tag up the top even though I have it in a print statement inside a <div> tag. All of the text shows up where its ment to but the asterix's dont want to appear there.

 

This is the function, its just ment to put an asterix where the password is.

 

function asterix($pass){

$asterix = 0;

$length = strlen($pass);

while ($asterix < $length){

print '*';

$asterix++;

}

}

 

I wont type the whole print statement cause its fairly big, but its pretty much like this.

 

print '<div class="setup"><table><tr><td>Password: ' . asterix($_SESSION['password']) . '</td></tr></table></div>';

 

What am I missing that would cause it to not print in the right place? Thanks heaps

Link to comment
https://forums.phpfreaks.com/topic/207672-function-print-outside-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.