Syntax error, unexpected T_STRING

Hi to all. I am new in php. help me please to write corecte this :

$vido_act='<a rel="shadowbox;width=405;height=340" title="<?php echo $row['site_link']; ?>  Tur virtual" href=<?php echo $row['video_link']; ?>><img src="img/tur_act.jpg" /></a>';

becous when I try to use this variable I got the
Parse error: syntax error, unexpected T_STRING

You dont need to use the <?php tags inside a php string



$vido_act='<a rel="shadowbox;width=405;height=340" title="'. $row['site_link'].'  Tur virtual" href="'.  $row['video_link'] .'"><img src="img/tur_act.jpg" /></a>';

And if I need to use this in my line how to write corect it.
I use this variable in other page where is selection from database

I gave you the correct way of writing it!
If you need to use variable inside a string you can do:

Single quotes


$myVariable = 'Spike';

$myString = 'My name is '. $myVariable;


or
Double quotes


$myVariable = 'Spike';

$myString = "My name is $myVariable";

but if I what to write some thing like this:


<?php
	 if($row['video_link'] !=$not_activ) 
{
echo '<a rel="shadowbox;width=405;height=340" title="<?php echo $row['site_link']; ?>  Tur virtual" href=<?php echo $row['video_link']; ?>><img src="img/tur_act.jpg" /></a>';
}
else
{
echo	'<img src="img/tur_inact.jpg" />';
} 
?>

how to write the echo correct and thenk you for the previous answers



<?php

     if($row['video_link'] !=$not_activ) 

{

echo '<a rel="shadowbox;width=405;height=340" title="<?php echo $row[site_link]; ?>  Tur virtual" href="<?php echo $row[video_link]; ?> "><img src="img/tur_act.jpg" /></a>;
}

else

{

echo    '<img src="img/tur_inact.jpg" />';

} 

?>



I dont get what I need.
the $row[‘site_link’] is a column from database

The you would use:


if($row['video_link'] !=$not_activ)  
{ 
echo '<a rel="shadowbox;width=405;height=340" title="'. $row['site_link'] .'  Tur virtual" href="'. $row['video_link'] .'"><img src="img/tur_act.jpg" /></a>'; 
} 
else 
{ 
echo    '<img src="img/tur_inact.jpg" />'; 
}  

Thank you so much

For reference, start at http://php.net/strings to learn about strings. Hopefully after reading that page (maybe a few times), writing your own new code correctly will become less time consuming. (: