json_encode utf8 problem
<?php echo json_encode(utf8_encode($this->recipe['recipe_name']), JSON_ERROR_UTF8); ?>
$this->recipe['recipe_name'] is calling a Mysql Database data,
and the output in the web file as just quotation.
at this point, I've looked at various tutorials and I can't figure out what is the problem.
I believe JSON_ERROR_UTF8 only has meaning within the context of the return value from json_last_error() (see example 1).
how do I show the the data in the database?
I have tried many json_encode JSON_ERROR_UTF8 etc. and not working at all.
I have it reading a post name with hyphens to replace spaces.
how do I have the url to handle hyphens for SEO purposes in php MVC format?
I think I need an explanation of what you're ultimately trying to accomplish with all this encoding? If it's just to get it to work in a URL, perhaps all you need is url_encode()?
in my MySql database, I have url slugs, to replace spaces with hyphens, and I wan't it to read by that column with those slugs, and its not reading that certain row, or not displaying the content, and I need some help on how to make that work