• 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

Saving Data from form to database using AngularJS and php

How to get the total hour from starting time to end time in php

php script to delete files older than 24 hrs, deletes all files

Laravel Sanctum CSRF not authenticating

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

Unable to run composer install

How to create a video stream from a single dynamic image in PHP

How to display table header in every page using FPDF library?

javascript html popup window

add " ? " in url via htaccess RewriteRule

The sum of the user's points

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

Live search query using JS and PHP for QA forum

Php - Sum up the numbers in an array one by one

Add and update products to session cart in Laravel

About Contact Privacy policy Terms and conditions