• 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

how to see if database exists with PDO [duplicate]

Check if a string contain multiple specific words

PHP returning an error message and false

Search for array row with specific column value and return another value from qualifying row

Get data from accuweather api url

PHP's array_map including keys

Server-sent events in PHP (without echo or print)

Use same method for inertia response and json response Laravel Jetstream

PHP | "The requested PHP extension bcmath is missing from your system."

Adding multiple items to WooCommerce cart at once

How to insert data from multiple select dropdown values into database?

Extract house numbers from address string

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

Laravel 5.5 change unauthenticated login redirect url

how to get the header value, if we don't know the value because the value is random from the server

About Contact Privacy policy Terms and conditions