PHP Syntax.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

PHP Syntax.

Post by quadoc »

I want to convert the following HTML to PHP but I don't quite know how. Could someone please post some tips. Thanks...

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()"><?=substr($message_2,0,30)?></td>
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I don't get it, it looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
;quote;hidetip()">'.substr($message_2,0,30).'</td>'; g would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
nt,\''.$message_1.'\')" onMouseout="hiing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
uote;showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; [p(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; [/php:1: looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
ge_2,0,30).'</td>'; ;quote;>'.substr($message_2,0,30).'</td>';

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
.'</td>'; amp;lt;td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()"> looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
()">'.substr($message_2,0,30).'</td>'; r way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
amp;quote;showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'&amamp;lt;td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
lt;td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; seover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
php]echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>'; looks fine to me?

Another way of doing would be

Code: Select all

echo '<td onMouseover="showtip(this,event,\''.$message_1.'\')" onMouseout="hidetip()">'.substr($message_2,0,30).'</td>';
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

There is no mouseover event for PHP.
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

Sorry, I want to add the bgcolor to the tag. :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>
or: #000;"><?=substr($message_2,0,30)?></td>wtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>etip()" style="background-color: #000;howtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>useout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td;quote;hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td&am<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>Mouseover="showtip(this,event,'<?=$message_1?&gt;')&quote; onMouseout=&quote;hidetip()&quote; style=&quote;background-color: #000;&quote;&gt;&lt;?=substr($message_2,0,30)?></td>message_2,0,30)?></td>><?=substr($message_2,0,30)?></td>,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>0,30)?></td>mp;amp;gt;')" onMouseout="hidetip()" style="background-color: #000;">&am<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()&quote; style=&quote;background-color: #000;&quote;&gt;&lt;?=substr($message_2,0,30)?&gt;&lt;/td>over="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>quote;><?=substr($message_2,0,30)?></td&gt;amp;quote;showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>s,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td> onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td><td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout=&quote;hidetip()&quote; style=&quote;background-color: #000;&quote;&gt;&lt;?=substr($message_2,0,30)?&gt;&amp1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>mp;gt;')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>p;quote; onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td><td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td><td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: #000;"><?=substr($message_2,0,30)?></td>
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

I'm sorry for not making this clearer in the first place. The bgcolor I'm using is a variable. :roll:
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

lol no prob, but in the futur be as clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
uote;hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>hp]<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>age_1?>')" onMouseout="hidetip()&quote; style=&quote;background-color: &

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?><?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>&quon the futur be as clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>uote; style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>]<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>p;amp;lt;?=$bgcolor?>"><?=substr($message_2,0,30)?></td>amp;quote;showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style=&qun the futur be as clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
r as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
" style="background-color: <?=$bgcolor?&gt;&quote;&gt;<?=substr($message_2,0,30)?></td>ossible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
;?=substr($message_2,0,30)?></td>eb0c802]<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?&gt;&lt;/td&gt;n the futur be as clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?>&amper="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?>"showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substrip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
n the futur be as clear as possible

Code: Select all

<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
<td onMouseover="showtip(this,event,'<?=$message_1?>')" onMouseout="hidetip()" style="background-color: <?=$bgcolor?>"><?=substr($message_2,0,30)?></td>
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

Thanks alot jcart :D
Post Reply