PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, March 4, 2022

[FIXED] Arabic meta tags

 March 04, 2022     html, meta-tags, php, yii     No comments   

Issue

I am trying to show an Arabic meta tags, but when ever I load the page, and I view the source it shows some garbage.

This is my config.php file

define("GAMES_META_DESCRIPTION",   "بيسبي");

and this is my header file

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="ar-sy">
<meta name="description" content="<?=htmlentities($meta_description);?>">
</head>

any help with be rewarded with a cookie :)


Solution

Did you try using plain arabic characters instead of using a function e.g meta name="description" content="بيسب"

probably the problem is in your function itself not encoding.



Answered By - wael34218
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing