RE: [PHP] Newbie Question regarding Syntax
| From: | Cesar Aracena | Date: | Sun, 17 Aug 2003 23:18:57 +0000 |
| Subject: | RE: [PHP] Newbie Question regarding Syntax | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159871@lists.php.net to get a copy of this message | ||
I would encourage you to use double quotes instead of single quotes
inside the PHP code. After this, you must comment HTML double quotes so
the PHP engine does not consider these as part of its code. I would type
your example like this:
<?php
echo "Email: <a
href=\"mailto:me@mine.com\">".$row_rep_RS['repEmail']."</a>";
?>
Note how the only concatenated string (using periods) is the variable
$row_rep_RS[] and the double quotes inside the HTML link were commented
using a backslash.
HTH,
Cesar Aracena
www.icaam.com.ar
> -----Mensaje original-----
> De: Creative Solutions New Media [mailto:csnm@ns.sympatico.ca]
> Enviado el: Domingo, 17 de Agosto de 2003 08:08 p.m.
> Para: php-general@lists.php.net
> Asunto: [PHP] Newbie Question regarding Syntax
>
> <?php echo 'Email: '.'<A
>
> HREF="mailto:me@mine.com">'.$row_rep_RS['repEmail'].'</A>';
> ?>
>
> Obviously this isn't working. What is the proper syntax when you have
to
> use
> double quotes inside the tag?
>
> Thx
>
> Tim Winters
> Manager, Creative Development
> Sampling Technologies Incorporated (STI)
> webmaster@samplingtechnologies.com
> csnm@samplingtechnologies.com
> W: 902 450 5500
> C: 902 430 8498
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php