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µ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!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.