PDA

View Full Version : Echos in Echos? [PHP]



MrCraig
05-05-2007, 07:42 PM
Is there any way to put an echo inside an echo?

eg

<?Echo("User: $logged[username]
if($logged[admbadge==1)echo("<img src=\"amd.gif\"></img>");
");?>

Edited by L&#181;ke (Forum Moderator): Thread Moved from Website Designing. Please post in the correct section next time, Thanks :).

Sygon..
05-05-2007, 07:45 PM
Is there any way to put an echo inside an echo?

eg

<?Echo("User: $logged[username]
if($logged[admbadge==1)echo("<img src=\"amd.gif\"></img>");
");?>

Why would you want to do that?

lol

Try this;

<?

echo("User: $logged[username]");

if($logged[admbadge ==1 )
{

echo("<img src=\"amd.gif\"></img>");

}

?>[

Sygon..
05-05-2007, 08:03 PM
Is there any way to put an echo inside an echo?

eg

<?Echo("User: $logged[username]
if($logged[admbadge==1)echo("<img src=\"amd.gif\"></img>");
");?>

Why would you want to do that?

lol

Try this;

<?

echo("User: $logged[username]");

if($logged[admbadge ==1 )
{

echo("<img src=\"amd.gif\"></img>");

}

?>[

Agnostic Bear
06-05-2007, 12:52 AM
<?Echo("User: $logged[username]
if($logged[admbadge==1)echo("<img src="amd.gif\"></img>");
");?>


o.o



echo( "User: {$logged["username"]}" );
if( $logged["admbadge"] == 1 )
{
echo( "<img src=\"amd.gif\" />" );
}

Want to hide these adverts? Register an account for free!