echoing trouble
Moderator: General Moderators
-
sk8erh4x0r
- Forum Commoner
- Posts: 43
- Joined: Wed May 26, 2004 8:27 pm
echoing trouble
I'm having trouble with my user info echo's. This is what i have right now:
echo "<center><h2>$row[username]<h2><center><img width ='70' height='70' src=\"$row[avatar]\"><br \>\n";
I'm trying to have the username and avatar post on the same line, but after the username, its inserting a line break and the avatar is under the username. Any help on how to fix this?
echo "<center><h2>$row[username]<h2><center><img width ='70' height='70' src=\"$row[avatar]\"><br \>\n";
I'm trying to have the username and avatar post on the same line, but after the username, its inserting a line break and the avatar is under the username. Any help on how to fix this?
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
- andre_c
- Forum Contributor
- Posts: 412
- Joined: Sun Feb 29, 2004 6:49 pm
- Location: Salt Lake City, Utah
... actually it seems to me that your variables are fine as $row[username] since you have them inside of double quotes.
You might try getting everything inside of the <center> tags instead of just the h2 tags, or if that doesnt work put it in a table with two table cells:
You might try getting everything inside of the <center> tags instead of just the h2 tags, or if that doesnt work put it in a table with two table cells:
Code: Select all
<?
echo "<table align='center'>\n";
echo " <tr>\n";
echo " <td><h2>$row[username]</h2></td>\n";
echo " <td><img width='70' height='70' src='$row[avatar] /></td>\n";
echo " </tr>\n";
echo "</table>\n";
?>-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Code: Select all
echo "<center><h2>$rowїusername]<h2><center><img width ='70' height='70' src="$rowїavatar]"><br \>\n";Code: Select all
echo "<center><h2>$rowї'username']<img width ='70' height='70' src="$rowї'avatar']"></h2></center>\n";-
sk8erh4x0r
- Forum Commoner
- Posts: 43
- Joined: Wed May 26, 2004 8:27 pm
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
try this:
Code: Select all
echo "<center><h2>{$row['username']}<h2><center><img width ='70' height='70' src="{$row['avatar']}"><br \>\n";