TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   what is wrong in this line :S? (http://www.talkphp.com/absolute-beginners/3140-what-wrong-line-s.html)

codefreek 07-18-2008 10:28 PM

what is wrong in this line :S?
 
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'


PHP Code:

echo '<div class="hVlog" style="text-align: center">
<a href="http://www.youtube.com/v/'
.$linkarray[1]." class="hVlogTarget" type="application/x-shockwave-flash" onclick="vPIPPlay(this'''''active=true, caption=Youth Wasted'); return false;">
<img src="
http://s2.ytimg.com/vi/'.$linkarray[1]." /></a> <br />
<a href="http://www.youtube.com/v/'.$linkarray[1]." type="application/x-shockwave-flash" onclick="vPIPPlay(this, '', '', ''); return false;">
Video
</div>'; 

Thank you in advance!.
^^

CoryMathews 07-18-2008 10:52 PM

<a href="http://www.youtube.com/v/'.$linkarray[1]."

Just for got a ' before the "

and then escape the ' with \' when you actually want to print out a '

CoryMathews 07-18-2008 11:07 PM

echo '<div class="hVlog" style="text-align: center">
<a href="http://www.youtube.com/v/'.$linkarray[1].'" class="hVlogTarget" type="application/x-shockwave-flash" onclick="vPIPPlay(this, \'\', \'\', \'active=true, caption=Youth Wasted\'); return false;">
<img src="http://s2.ytimg.com/vi/'.$linkarray[1].'" /></a> <br />
<a href="http://www.youtube.com/v/'.$linkarray[1].'" type="application/x-shockwave-flash" onclick="vPIPPlay(this, \'\', \'\', \'\'); return false;">
Video
</div>';

That should work.

Get yourself a program such as aptana studio, jedit or some other program that will color your code. That really helps for errors like this.

codefreek 07-19-2008 05:05 PM

I FIXED IT!

I AM SO HAPPY!


All times are GMT. The time now is 04:47 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0