For some reason, echo "<img src=\"http://myimglink.com/img.png" border=0>"; } Code (markup): Isn't working for a PHP echo output. How can I fix this? Thanks in advance.
echo "<img src=\"http://myimglink.com/img.png\" border=0>"; PHP: or echo '<img src="http://myimglink.com/img.png" border=0>'; PHP:
I can see output of echo "hello"; But below is not working? Can somebody help me ? echo "<img src=\"dog.png\" height=10 width=10>";
what i can see is the problem was with double quotes. when you are using double quotes make sure not to use it again in the same case use single quote instead.
just got to make sure to sanitize the string that is in the echo statement. What designer are you using for your coding? There are some pretty decent low cost applications (probably some free too) that catch coding errors like this.
HI guys, I`m trying my first page with Vertex free template. Can some one help me to change background color to an image. php index is:<style type="text/css"> body {font-family: '<?php echo $s5_fonts;?>',Helvetica,Arial,Sans-Serif ;background:#<?php echo $s5_page_bg ?>;} css template is: body { color:#333333; font-size:0.8em; line-height:140%;} Vertex have a choose color in vertex admin UI I tryed put image links, colors but nothing happend on the website in css i has allready change header color, some of shadows and more. But the image i can`t find it the right way, very pls HELP Me.. Best regards Thanks in advance Zikkina KilRogg
Look there and help me to add here siza of image in line 11 Here is the display ---> echo "<img src=\"images/" . $row['filename'] . "\" alt=\"\" /><br />"; <?php // Grab the data from our people table $sql = "select * from njerz"; $result = mysql_query($sql) or die ("Could not access DB: " . mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo "<div class=\"picture\">"; echo "<p>"; // Note that we are building our src string using the filename from the database echo $row['fname'] . " " . $row['lname'] . "<br />"; echo "<img src=\"images/" . $row['filename'] . "\" alt=\"\" /><br />"; echo "</p>"; echo "</div>"; } ?>
That's backwards - unless you have to use double quotes to quote the string, use single quotes. (Then you can use double quotes inside the string, but that's not the reason to quote strings in PHP with single quotes.) If you don't know why you have to use double quotes, don't.
Make the image the size you want using a picture editor, and don't tell the browser what size to make it. Different browsers mess graphics up differently when they resize them.
i mean here echo "<img src=\"images/" . $row['filename'] . "\" alt=\"\" /><br />"; Can you add a size tagg or something else for example echo "<img src=\"images/" . $row['filename'] . "\" height="400" widht="400" alt=\"\" /><br />"; But that don't work :S
Make it echo '<img src="images/"' . $row['filename'] . '\" height="400" widht="400" alt="\" /><br />'; In the part after $row['filename'], you closed the quote here "\", that's why it won't work. Using single quotation IMO is better since you don't get confuse as much as you use double quotation.