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.

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";
?>

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

Member Avatar for diafol
$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>.

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.

$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?

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

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

Member Avatar for diafol

@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

Member Avatar for soldierflup

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;

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;

yeah use quotes. but u should use these ones:

-left

-right


from here: http://www.yourhtmlsource.com/text/specialcharacters.html
i heard using the numbers is more cross browser vs the &ldquo; and the &rdquo;
edits:sorry they dont come out in numbers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.