RE: [PHP] How to use ph to set meta tags ?
You're close but instead of ? mAuthor() ? try ?php print mAuthor(); ? That will print the return value of your function - which by example is Daniel Szasz. -M -Original Message- From: Daniel Szasz [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] How to use ph to set meta tags ? Hello I wish to create be able to put in the meta tags value from functions. How can be done ? Here is part of the code : ?php function mAuthor() { $Author = Daniel Szasz; return $Author; }; ? ? ? HTML HEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META NAME=mAuthor CONTENT= ? mAuthor() ? /HEAD /HTML Thanks a lot for the help Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to use ph to set meta tags ?
?php function mAuthor() { $Author = 'Daniel Szasz'; print $Author; }; ? Then use: META NAME=Author CONTENT=? mAuthor(); ? Notice I replaced $Author = Daniel Szasz; with $Author = 'Daniel Szasz'; This tells php to just assign the value to the variable and not to bother performing any interpretation on it. This speeds up your script intepretation. You also forgot the ';' in the html/php statement for the Meta Name. HTH, Johnny -Original Message- From: Daniel Szasz [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 12:07 PM To: [EMAIL PROTECTED] Subject: [PHP] How to use ph to set meta tags ? Hello I wish to create be able to put in the meta tags value from functions. How can be done ? Here is part of the code : ?php function mAuthor() { $Author = Daniel Szasz; return $Author; }; ? ? ? HTML HEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META NAME=mAuthor CONTENT= ? mAuthor() ? /HEAD /HTML Thanks a lot for the help Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use ph to set meta tags ?
I wish to create be able to put in the meta tags value from functions. How can be done ? Here is part of the code : ?php function mAuthor() { $Author = Daniel Szasz; return $Author; }; ? ? ? HTML HEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META NAME=mAuthor CONTENT= ?php echo mAuthor() ? /HEAD /HTML -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use ph to set meta tags ?
Daniel Szasz [EMAIL PROTECTED] wrote: Hello I wish to create be able to put in the meta tags value from functions. How can be done ? Here is part of the code : ?php function mAuthor() { $Author = Daniel Szasz; return $Author; }; ? [...] HTML HEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META NAME=mAuthor CONTENT= ? mAuthor() ? You might also want to make sure that it is quoted: META NAME=mAuthor CONTENT=?echo mAuthor() ? Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php