How can I make this tooltip display correctly?

Head out to http://countryshowdown.com/new_map.php

Hover over California. The Tooltip should have those station listed in a column and I don't know how to insert a line break.

this is what I'm using for my code:

<area href="new_map_display.php?state=<?php echo $bruce_row['state_id']; ?>" shape="poly" coords="<?php echo $bruce_row['coords']; ?>" title="<?php
$querystate = "select * from dbo_states where id='$bruce_row[state_id]'";	
$resultstate = mysqli_query($cxn, $querystate);			
if(!$resultstate) {

$errorradio = mysqli_errno($cxn).':'.mysqli_error($cxn);
die($errorradio);
}		
$rowstate = mysqli_fetch_assoc($resultstate);			
extract($rowstate);			
$radiostate = $State;
$region = $region_id;	
	
$query = "select * from dbo_radio_stations where state_id='$bruce_row[state_id]' order by contestdate ASC";			
$result = mysqli_query($cxn, $query);		
if(!$result) {
$errorresult = mysqli_errno($cxn).':'.mysqli_error($cxn);
die($errorresult);
}
while ($station_row=mysqli_fetch_assoc($result))
{
$michelle= "select * from registration where radio_name='$station_row[station_name]' and year='$this_year' and winner_type='State'";
$michelle_query=mysqli_query($cxn, $michelle)
or die("Michelle fell short");
$michelle_count=mysqli_num_rows($michelle_query);
	if($michelle_count>0)
	{
	$state_winner_alert=1;
	$the_winner_id=$michelle_row['id'];
	}
}
if($state_winner_alert==0)
{
$vivian = "select * from dbo_radio_stations where state_id='$bruce_row[state_id]' order by contestdate ASC";	
$vivian_query=mysqli_query($cxn, $vivian)
or die("Vivian didn't work!");
	while ($vivian_row=mysqli_fetch_assoc($vivian_query))
	{
	echo stripslashes($vivian_row['station_name']);
	}
		
}
else
{
$jorja="select	* from registration where id ='$the_winner_id'";
$jorja_query=mysqli_query($cxn, $jorja)
or die("Couldn't make Jorja happen.");
$jorja_row=mysqli_fetch_assoc($jorja_query);
extract($jorja_row);

	if(empty($jorja_row['stage_name']))
	{
	$display_name = stripslashes($jorja_row['first_name']).' '.stripslashes($jorja_row['last_name']);
	}
	else
	{
	$display_name = stripslashes($jorja_row['stage_name']);
	}
echo $display_name;
}
?>">
<?php
}
?>
</map>

Open in new window


How can I get the stations to display correctly with a line break in between each one?
brucegustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dejaanbuCommented:
PHP_EOL should do the trick for you.

echo $display_name.PHP_EOL;

or

echo $display_name."\r\n";
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
Wow, looking at the code I cannot figure out where the station call signs are located in the data base.  Most professional programmers would recommend the use of a coding standard and some comments to explain what you're trying to achieve.

This is just a guess, but I'm thinking that maybe the information comes from line 39?  If so, you can add an echo statement after that with PHP_EOL (which is the context-aware predefined end-of-line character).  So if this is line 39:

echo stripslashes($vivian_row['station_name']);
echo PHP_EOL;

Open in new window

0
brucegustPHP DeveloperAuthor Commented:
Guys, sorry for making you have to dig. Let me do this:

I've uploaded a static page that has the scaffolding of both what I'm trying to do as well as the problem I'm facing. Head out to http://www.countryshowdown.com/map_static.php.

First off, I'm using what they have at http://jqueryui.com/tooltip/ as my template. I'm trying to stylize my tooltip as <span class="map_tooltip">, but I don't know how to incorporate the <span> tag within my code without messing up the tooltip function. In other words, regardless of where I put <span="map_tooltip">, the tool tip becomes a static box in the upper left hand corner of the page. How do I incorporate my <span> tag properly so I can stylize the box that's functioning as my tooltip?

Also, in IE, I'm getting both my tooltip as well as an alt box that has the raw HTML in it. What am I doing wrong that's producing the alt tag?

Thanks!
0
brucegustPHP DeveloperAuthor Commented:
Never mind! I figured it out!

Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.