Hi all,
probably a basic question if anyone can help me out:
I need to concatenate a link to a string of text and be able to do this with either double or single quotes.
The PHP Code:
[php]<?php
$website1 = “http://www.wikipedia.org”;
$website2 = “http://www.nationalgeographic.com”;
echo “Catch up on all the latest, visit: Wikipedia”; //works
echo “
”;
echo ‘Catch up on all the latest, visit: National Geographic’; //works
?>[/php]
Both the double and single examples work fine, links are spaced for easier reading.
My questions relates to the second statement and the use of single quotes around the .
[php]<?php
echo ‘Catch up on all the latest, visit: National Geographic’; //works
echo “
”;
echo ‘Catch up on all the latest, visit: National Geographic’; //works
echo “
”;
echo ‘Catch up on all the latest, visit: National Geographic’; // Does not work
?>[/php]
Why do examples 1 and 2 only work and which is the best option to go with if any around the ?
i.e. or or it doesn’t matter?
Thanks,
Andy