0

This is the echo code from my site:

<?php
$url1 = "http://www.canadiandriver.com";
$url2 = "http://www.chevrolet.com.br";
$autoguide = "Autoweekly";
$autoguide1 = /"<b>"<a href=\"$url1\buyers-guide/2010/volkswagen/passat.php"\>New car of the day</a>"/</b>";
?>

Yet it produces a T_STRING error, and I can't work out how to fix it.
The other variables work fine, $autoguide1 does not, and no matter how much I practice, this one is hard for me to figure out.
Any advice is appreciated, thanks.

7
Contributors
11
Replies
12
Views
7 Years
Discussion Span
Last Post by SKANK!!!!!
0

This is the echo code from my site:

<?php
$url1 = "http://www.canadiandriver.com";
$url2 = "http://www.chevrolet.com.br";
$autoguide = "Autoweekly";
$autoguide1 = /"<b>"<a href=\"$url1\buyers-guide/2010/volkswagen/passat.php"\>New car of the day</a>"/</b>";
?>

Yet it produces a T_STRING error, and I can't work out how to fix it.
The other variables work fine, $autoguide1 does not, and no matter how much I practice, this one is hard for me to figure out.
Any advice is appreciated, thanks.

Dear Friend.
I am Not Understand that Actually What You want to Do with The above Code but if u want to print the autoguide1 variable then plz follow below code:

<?php
$url1 = "http://www.canadiandriver.com";
$url2 = "http://www.chevrolet.com.br";
$autoguide = "Autoweekly";
$autoguide1 = "<b><a href=$url1/buyers-guide/2010/volkswagen/passat.php>New car of the day</a></b>";
echo "$autoguide"; //if u dont want to print the auoguide variable then remove this line.
echo "$autoguide1";
?>
0

Dear Friend.
I am Not Understand that Actually What You want to Do with The above Code but if u want to print the autoguide1 variable then plz follow below code:

<?php
$url1 = "http://www.canadiandriver.com";
$url2 = "http://www.chevrolet.com.br";
$autoguide = "Autoweekly";
$autoguide1 = "<b><a href=$url1/buyers-guide/2010/volkswagen/passat.php>New car of the day</a></b>";
echo "$autoguide"; //if u dont want to print the auoguide variable then remove this line.
echo "$autoguide1";
?>

Thank you for that - the code below worked:

$autoguide1 = "<b><a href=$url1/buyers-guide/2010/volkswagen/passat.php>New car of the day</a></b>";
echo "$autoguide"; //if u dont want to print the auoguide variable then remove this line.
echo "$autoguide1";

However, what should I do to make the quotation marks bold within $autoguide1 without getting this error:

Parse error: syntax error, unexpected T_STRING in C:\www\vhosts\mycarsite\testing.php on line 5

0
$autoguide1 = /"<b>"<a href=\"$url1\buyers-guide/2010/volkswagen/passat.php"\>New car of the day</a>"/</b>";

Your problem is the non-catenated strings. Try this:

$autoguide1 = "<strong><a href='$url1/buyers-guide/2010/volkswagen/passat.php'>New car of the day</a></strong>";

<b> is (or is being) deprecated - use <strong>.

0

Your problem is the non-catenated strings. Try this:

$autoguide1 = "<strong><a href='$url1/buyers-guide/2010/volkswagen/passat.php'>New car of the day</a></strong>";

<b> is (or is being) deprecated - use <strong>.

Thanks, that worked, however, how do I make the quotation marks bold within $autoguide1 - I only get the first one and it ends up as this:

"New car of the day

- the second quotation marks set doesn't appear, for some reason.

0
$vwpassat = "<strong>\"<a href='$url1/buyers-guide/2010/volkswagen/passat.php'>VW PASSAT ARGENTINA</a>\"</strong>";

This seems to work - is this the correct syntax for bold quotation marks now?

0

you can put it like this

$autoguide1 = "<a href='$url1/buyers-guide/2010/volkswagen/passat.php'><strong>New car of the day</strong></a>";

hope that works shalom shalom

0

you can put it like this

$autoguide1 = "<a href='$url1/buyers-guide/2010/volkswagen/passat.php'><strong>New car of the day</strong></a>";

hope that works shalom shalom

0

@whitestream:
Yes that's fine - I'm sorry, I didn't realise you needed the quote marks in the displayed text.

Hmm, I was once told that attribute values should be placed in double quote marks for XHTML - however I can't remember seeing that in my cursories. If you need this:

vwpassat = "<strong>\"<a href=\"$url1/buyers-guide/2010/volkswagen/passat.php\">VW PASSAT ARGENTINA</a>\"</strong>";

should work

0

If I understand your problem you would like to achieve the following :
"This is a new car" :
use this :

$car = "<a href='$url/somepage.php'><strong>&quot;</strong>This is a new car<strong>&quot;</strong></a>";
echo $car;

If you would achieve this :
"This is a new car"
then use this :

$car = "<a href='$url/somepage.php'><strong>&quot;This is a new car&quot;</strong></a>";
echo $car;
0

This is the echo code from my site:

<?php
$url1 = "http://www.canadiandriver.com";
$url2 = "http://www.chevrolet.com.br";
$autoguide = "Autoweekly";
$autoguide1 = /"<b>"<a href=\"$url1\buyers-guide/2010/volkswagen/passat.php"\>New car of the day</a>"/</b>";
?>

Yet it produces a T_STRING error, and I can't work out how to fix it.
The other variables work fine, $autoguide1 does not, and no matter how much I practice, this one is hard for me to figure out.
Any advice is appreciated, thanks.

hii

if u simply want to print $autoguide and $autoguide1
then write this below ur code

echo $autoguide . "</br>";
echo $autoguide1;

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.