RE: [PHP] Parse Error(Newbie)
| From: | Brian McGarvie | Date: | Thu, 23 May 2002 11:51:34 +0000 |
| Subject: | RE: [PHP] Parse Error(Newbie) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98899@lists.php.net to get a copy of this message | ||
why now just write:
for ($i=0; $i <$num_results; $i++) {
$row = mysql_fetch_array($result);
echo "<a href=\"".$row['url']."\">link
text</a>";
> -----Original Message-----
> From: Nick Wilson [mailto:nick@explodingnet.com]
> Sent: 23 May 2002 12:28 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Parse Error(Newbie)
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> * and then webmaster@tececo.com declared....
> > I get a parse error on line 114 can anyone see the problem?
> >
> > Sorry if it is something obvious :}
> > for ($i=0; $i <$num_results; $i++)
> >
> > 110. {
> >
> > 111. $row = mysql_fetch_array($result);
> >
> > 112. echo '<a href="';
> >
> > 113. echo $row['url'];
> >
> > 114. echo '">';
>
>
> Have you tried escaping the double quotes?
> echo '\">';
> - --
> Nick Wilson // www.explodingnet.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE87NI7HpvrrTa6L5oRAox5AJwJ5alFlqn0VtSTdLWKiQNVoKvZtQCgsEhj
> Umv5vrmmT8J0dDGSehyv5CU=
> =LknC
> -----END PGP SIGNATURE-----
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>