• 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

How to convert binary string to normal string in php

phpstringlaravelencodingutf-8


PHP Snippet 1:

if(!mb_check_encoding($string)) {
    $string = iconv("LATIN1", "UTF-8//TRANSLIT//IGNORE", $string);
}

Related Snippets

protect my blog content

Lexik JWT authentication problem "Invalid credentials"

How to fix Call to undefined method AppModelsTableName::factory?

echo language construct is discouraged. (PHP)

How can I format this number correctly using PHP?

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

Symfony process run throws exception - executing on command line works

PHP each() function replacement

Could not decode a text frame as UTF-8.

laravel sanctum Route [login] not defined

XSS attack still works despite htmlspecialchars() doing its work

Google API Heatmap Layer exception, why?

Send POST data via raw JSON with Postman

Hide email address with stars (*)

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

About Contact Privacy policy Terms and conditions