Jump to content

Recommended Posts

Hey,

 

I am just trying to put the following into a php echo but it doesnt seem to work. How would I encapsulate this?

 


<td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td>

Link to comment
https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/
Share on other sites

Hey,

 

When I ran with this...

 

 

"<td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td>";

 

it gave me...

 

syntax error

"return overlib(showRest("

 

Is there something missing?

try this

 

echo <<< HEREDOC
<td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td>
HEREDOC;

Hi, I am not sure how thats supposed to be encapsulated? Not like this I take it...

 


echo <<< HEREDOC <td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td> HEREDOC;

try this

 

<?php 

echo <<< HEREDOC
<td href='javascript:void(0);' onmouseover="return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');" onmouseout="return nd();">link</td>
HEREDOC;
?>

Yes, here's the actual function in which its been called...

 

 


function random_results()
{
dbconnect();

$row2 = array();

$sql = "SELECT * FROM property_info ORDER BY RAND() LIMIT 3";
$result = mysql_query($sql) or die(mysql_error());

while(($row = mysql_fetch_row($result)) != false) 
	{
	$location = $row[2]; $location = getlocationname($location);
	$type = $row[3]; $type = gettypename($type);

	    echo "<table width='140' id='random_results' border='0' cellpadding='0' cellspacing='0'>";
		    echo "<tr>";
   		    echo "<td href='javascript:void(0);' onmouseover='return overlib(showRest2(" . $row[18] . " ," . $row[3] ."), MOUSEOFF, BACKGROUND);' onmouseout='return nd();'>link</td>";
    		echo "</tr>";
		echo "<tr>";
   		    echo "<td>€". $row[4] . ", " . $row[18] . " Bedrooms</td>";
    		echo "</tr>";

        }

    $table .= "</table>";
    return $table;


}


This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.