Re: [PHP] Parsing... the hell of PHP
Hello Mário, Wednesday, March 30, 2005, 2:51:02 PM, you wrote: MG Here is my last (of many) attempt: MG $url = a href =\.$url.\.HtmlEntities($url).\./a; $url = a href=\$url\ . htmlentities($url) . '/a'; Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing... the hell of PHP
$url = a href =\.$url.\.HtmlEntities($url).\./a; It appears the parse error is at the end of your opening link tag, so PHP doesn't know what .HtmlEntities($url) means. I'm at work so I can't test it, but that appears the culprit to me. $url = a href=\$url\ . HtmlEntities($url) . /a; should suffice. Martin Austin Mário Gamito [EMAIL PROTECTED] 03/30/2005 07:51 AM To: php-general@lists.php.net cc: Subject:[PHP] Parsing... the hell of PHP Hi, I'm trying to transform a url taken from the DB from plain text, to the same, but linkable url. All i get is parse errors and alike. Here is my last (of many) attempt: $url = a href =\.$url.\.HtmlEntities($url).\./a; A warning and a parse error is what i get. Can't get there :( Any help would be apreciated. Warm regards, Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing... the hell of PHP
Hi, Thank you all that answered my question. It worked. I think i'll never get used to this parsing PHP stuff :( Warm Regards, Mário Gamito [EMAIL PROTECTED] wrote: $url = a href =\.$url.\.HtmlEntities($url).\./a; It appears the parse error is at the end of your opening link tag, so PHP doesn't know what .HtmlEntities($url) means. I'm at work so I can't test it, but that appears the culprit to me. $url = a href=\$url\ . HtmlEntities($url) . /a; should suffice. Martin Austin Mário Gamito [EMAIL PROTECTED] 03/30/2005 07:51 AM To: php-general@lists.php.net cc: Subject:[PHP] Parsing... the hell of PHP Hi, I'm trying to transform a url taken from the DB from plain text, to the same, but linkable url. All i get is parse errors and alike. Here is my last (of many) attempt: $url = a href =\.$url.\.HtmlEntities($url).\./a; A warning and a parse error is what i get. Can't get there :( Any help would be apreciated. Warm regards, Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing... the hell of PHP
Hi, Thank you all that answered my question. It worked. I think i'll never get used to this parsing PHP stuff :( Warm Regards, Mário Gamito [EMAIL PROTECTED] wrote: $url = a href =\.$url.\.HtmlEntities($url).\./a; It appears the parse error is at the end of your opening link tag, so PHP doesn't know what .HtmlEntities($url) means. I'm at work so I can't test it, but that appears the culprit to me. $url = a href=\$url\ . HtmlEntities($url) . /a; should suffice. Martin Austin Mário Gamito [EMAIL PROTECTED] 03/30/2005 07:51 AM To: php-general@lists.php.net cc: Subject:[PHP] Parsing... the hell of PHP Hi, I'm trying to transform a url taken from the DB from plain text, to the same, but linkable url. All i get is parse errors and alike. Here is my last (of many) attempt: $url = a href =\.$url.\.HtmlEntities($url).\./a; A warning and a parse error is what i get. Can't get there :( Any help would be apreciated. Warm regards, Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing... the hell of PHP
Glad to have helped (though someone else beat me to the punch with the right answer!) You'll get the hang of it -- the way I learned is to write out your tag that you'd like to use like this: a href=$urltext here/a Then go through and escape the characters that need it: a href=\$url\text here/a You can place variables into a string, but if you are using a function to work on that variable, you must concatenate it. a href=\$url\ . htmlentities($url) . /a; (needs concatenation) a href=\$url\$url/a; (no function used, no concatenation necessary) Good luck! Martin Austin Shared Services A/R Ph 952.906.6653 Fax 952.906.6500 SUPERVALU Tradition .:. Excellence .:. Future Promise 135 Years of Fresh Thinking ... Mário Gamito [EMAIL PROTECTED] 03/30/2005 10:15 AM To: php-general@lists.php.net cc: Subject:Re: [PHP] Parsing... the hell of PHP Hi, Thank you all that answered my question. It worked. I think i'll never get used to this parsing PHP stuff :( Warm Regards, Mário Gamito [EMAIL PROTECTED] wrote: $url = a href =\.$url.\.HtmlEntities($url).\./a; It appears the parse error is at the end of your opening link tag, so PHP doesn't know what .HtmlEntities($url) means. I'm at work so I can't test it, but that appears the culprit to me. $url = a href=\$url\ . HtmlEntities($url) . /a; should suffice. Martin Austin Mário Gamito [EMAIL PROTECTED] 03/30/2005 07:51 AM To: php-general@lists.php.net cc: Subject:[PHP] Parsing... the hell of PHP Hi, I'm trying to transform a url taken from the DB from plain text, to the same, but linkable url. All i get is parse errors and alike. Here is my last (of many) attempt: $url = a href =\.$url.\.HtmlEntities($url).\./a; A warning and a parse error is what i get. Can't get there :( Any help would be apreciated. Warm regards, Mário Gamito -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing... the hell of PHP
[EMAIL PROTECTED] wrote: $url = a href =\.$url.\.HtmlEntities($url).\./a; It appears the parse error is at the end of your opening link tag, so PHP doesn't know what .HtmlEntities($url) means. I'm at work so I can't test it, but that appears the culprit to me. $url = a href=\$url\ . HtmlEntities($url) . /a; should suffice. Please don't make a habit of changing the case of built-in PHP functions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php