• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

phpmysqlarraysjson


PHP Snippet 1:

echo json_encode(array("id"=>"1","data" => utf8_encode(strip_tags($row["post_content"]))));

PHP Snippet 2:

$jsonData = json_encode($string, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );


JSON_UNESCAPED_SLASHES  = Allows you to use "//" characters.
JSON_PRETTY_PRINT = Writes the json data legibly.

Related Snippets

Mobile browsers are adding .html to filename on download

Refresh specific HTML content that retrieves data from MySQL

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

How to extract price from given url using Xpath?

WHM Enabling mod_rewrite

WordPress Security Standards want me to escape my html, but how to do it correctly?

Check If array is null or not in php

Destroy session upon refresh

Which is faster php date functions or carbon?

Lexik JWT authentication problem "Invalid credentials"

Group rows by column and sum another column within groups [duplicate]

add uri parameter to Route name in laravel

laravel sanctum Route [login] not defined

Redirect to previous page with php

how to check version of codeigniter framework?

About Contact Privacy policy Terms and conditions