echo $rows help


Posted on 16th Feb 2014 07:03 pm by admin

Hi all,

Hopefully something simple that I don't know!

Did you know?Explore Trending and Topic pages for more stories like this.
I have this:

Code: [Select]<div id="marquee">


<?php
$query = mysql_query("SELECT stock_id, stock_code, t_val, y_val FROM stocks");
while($rows=mysql_fetch_array($query))
{
$stock_code = $rows['stock_code'];
$t_val = $rows['t_val'];
$y_val = $rows['y_val'];
$stock_id = $rows['stock_id'];

echo "<marquee>";
echo "<span style='color:#09F'>$stock_code</span>";
echo "&nbsp;";
echo "<span style='color:#0F0'>Todays Price = $t_val</span>";
echo "&nbsp;";
echo "<span style='color:#F00'>Yesterdays Price = $y_val</span>";
echo "</marquee>";
}

?>Which simply displays the output of a database in a scrolling marquee, which almost works! However the problem I have is that it displays like this:

ROW1
ROW2

How can I make it display like this:

ROW1 ROW2

Many thanks
No comments posted yet

Your Answer:

Login to answer
129 Like 28 Dislike
Previous forums Next forums
Other forums

cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a d

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Issue Parsing XML into table
Hello all,

Im a bit new to php and new to phpfreaks. But thanks in advance for the help!
<

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash